Skip to content

Commit

Permalink
Add tests to ensure deleted projects are not shown in project listing…
Browse files Browse the repository at this point in the history
… pages
  • Loading branch information
lozette committed Apr 10, 2024
1 parent b0e5146 commit 9b42e7c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,15 @@
expect(page).to have_content("Form a MAT project?")
expect(page).to have_content("Yes")
end

scenario "deleted projects are not shown" do
deleted_project = create(:conversion_project, :deleted, urn: 121583)
in_progress_project = create(:conversion_project, urn: 115652)

visit all_in_progress_projects_path

expect(page).to_not have_content(deleted_project.urn.to_s)
expect(page).to have_content(in_progress_project.urn.to_s)
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@
expect(page).to have_content(project.outgoing_trust.name)
end

scenario "they do not see deleted projects" do
project = create(:transfer_project, :deleted, assigned_to: user)

visit in_progress_your_projects_path

expect(page).to_not have_content(project.establishment.name)
expect(page).to_not have_content(project.urn)
end

context "when they are NOT in the Regional casework services team" do
let(:user) { create(:regional_delivery_officer_user) }

Expand Down

0 comments on commit 9b42e7c

Please sign in to comment.