Add sdg manager section to admin
Allow a user to become an sdg manager
This commit is contained in:
@@ -43,6 +43,21 @@ describe "Moderation" do
|
||||
expect(page).to have_content "You do not have permission to access this page"
|
||||
end
|
||||
|
||||
scenario "Access as SDG manager is not authorized", :js do
|
||||
create(:sdg_manager, user: user)
|
||||
|
||||
login_as(user)
|
||||
visit root_path
|
||||
|
||||
expect(page).not_to have_link("Moderation")
|
||||
|
||||
visit moderation_root_path
|
||||
|
||||
expect(page).not_to have_current_path(moderation_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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user