From 36e696594db2741925e2d43ea35e617214f1e247 Mon Sep 17 00:00:00 2001 From: oliverpool Date: Tue, 19 Mar 2024 09:05:41 +0100 Subject: [PATCH] scaffold project header test --- models/fixtures/project.yml | 12 ++++++++++++ tests/integration/org_project_test.go | 13 +++++++++++++ 2 files changed, 25 insertions(+) diff --git a/models/fixtures/project.yml b/models/fixtures/project.yml index 44d87bce04..aa4273476e 100644 --- a/models/fixtures/project.yml +++ b/models/fixtures/project.yml @@ -69,3 +69,15 @@ type: 2 created_unix: 1688973000 updated_unix: 1688973000 + +- + id: 7 + title: project on org3 + owner_id: 3 + repo_id: 0 + is_closed: false + creator_id: 3 + board_type: 1 + type: 3 + created_unix: 1688973000 + updated_unix: 1688973000 diff --git a/tests/integration/org_project_test.go b/tests/integration/org_project_test.go index a14004f6b0..966963957c 100644 --- a/tests/integration/org_project_test.go +++ b/tests/integration/org_project_test.go @@ -59,3 +59,16 @@ func TestOrgProjectAccess(t *testing.T) { req = NewRequest(t, "GET", "/org3/-/projects") session.MakeRequest(t, req, http.StatusNotFound) } + +func TestOrgProjectHeader(t *testing.T) { + defer tests.PrepareTestEnv(t)() + + req := NewRequest(t, "GET", "/org3/-/projects/5") + resp := MakeRequest(t, req, http.StatusOK) + htmlDoc := NewHTMLParser(t, resp.Body) + menu := htmlDoc.Find(".page-content .secondary.menu a") + for _, l := range menu.Nodes { + t.Log(l.Attr) // check href attribute + } + t.FailNow() +}