Add sdg manager section to admin

Allow a user to become an sdg manager
This commit is contained in:
taitus
2020-11-25 18:57:19 +01:00
committed by Javi Martín
parent fb5965fe63
commit 9fe24aec9d
24 changed files with 301 additions and 0 deletions

View File

@@ -42,6 +42,19 @@ describe "Valuation" do
expect(page).to have_content "You do not have permission to access this page"
end
scenario "Access as SDG manager is not authorized" do
create(:sdg_manager, user: user)
login_as(user)
visit root_path
expect(page).not_to have_link("Valuation")
visit valuation_root_path
expect(page).not_to have_current_path(valuation_root_path)
expect(page).to have_current_path(root_path)
expect(page).to have_content "You do not have permission to access this page"
end
scenario "Access as poll officer is not authorized" do
create(:poll_officer, user: user)
login_as(user)