Add missing link and button on management interface
This commit is contained in:
committed by
Javi Martín
parent
031ec8fce1
commit
228a1d9090
@@ -2,6 +2,7 @@ require "rails_helper"
|
||||
|
||||
describe "Management" do
|
||||
let(:user) { create(:user) }
|
||||
before { Setting["org_name"] = "CONSUL" }
|
||||
|
||||
scenario "Should show admin menu if logged user is admin" do
|
||||
create(:administrator, user: user)
|
||||
@@ -11,9 +12,12 @@ describe "Management" do
|
||||
click_link "Menu"
|
||||
click_link "Management"
|
||||
|
||||
expect(page).to have_content("My content")
|
||||
expect(page).to have_content("My account")
|
||||
expect(page).to have_content("Sign out")
|
||||
expect(page).to have_link "Go back to CONSUL"
|
||||
|
||||
expect(page).to have_link "You don't have new notifications"
|
||||
expect(page).to have_link "My content"
|
||||
expect(page).to have_link "My account"
|
||||
expect(page).to have_link "Sign out"
|
||||
end
|
||||
|
||||
scenario "Should not show admin menu if logged user is manager" do
|
||||
@@ -24,8 +28,11 @@ describe "Management" do
|
||||
click_link "Menu"
|
||||
click_link "Management"
|
||||
|
||||
expect(page).not_to have_content("My content")
|
||||
expect(page).not_to have_content("My account")
|
||||
expect(page).not_to have_content("Sign out")
|
||||
expect(page).to have_link "Go back to CONSUL"
|
||||
|
||||
expect(page).not_to have_content "You don't have new notifications"
|
||||
expect(page).not_to have_content "My content"
|
||||
expect(page).not_to have_content "My account"
|
||||
expect(page).not_to have_content "Sign out"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user