-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
making feature test and removing view test
- Loading branch information
Showing
3 changed files
with
27 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# frozen_string_literal: true | ||
|
||
RSpec.describe 'header links', type: :feature do | ||
context 'when not signed in' do | ||
it 'shows sign in' do | ||
visit main_app.root_path | ||
|
||
expect(page).to have_link('Sign in', href: '/users/sign_in') | ||
end | ||
end | ||
|
||
context 'when signed in' do | ||
let(:user) { FactoryBot.create(:site_admin) } | ||
|
||
it 'shows user util links for admin user' do | ||
login_as user | ||
|
||
visit main_app.root_path | ||
|
||
expect(page).to have_selector '#user-util-collapse', text: 'Site administration' | ||
expect(page).to have_selector '#user-util-collapse', text: 'Create new exhibit' | ||
expect(page).to have_selector '#user-util-collapse', text: 'Change Password' | ||
expect(page).to have_selector '#user-util-collapse', text: 'Sign out' | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.