link to organization#new from user menu
This commit is contained in:
parent
d9b2ebfc36
commit
61ddbcfe04
3 changed files with 34 additions and 7 deletions
24
spec/features/user_menu_spec.rb
Normal file
24
spec/features/user_menu_spec.rb
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
require 'spec_helper'
|
||||
|
||||
feature '_user_menu' do
|
||||
let(:admin) { create(:admin) }
|
||||
subject { page }
|
||||
before { sign_in admin }
|
||||
|
||||
scenario 'when no organization is present', feature: true, js: true do
|
||||
visit root_path
|
||||
click_link admin.name
|
||||
|
||||
is_expected.to have_text('New Organization')
|
||||
is_expected.to_not have_text('New Conference')
|
||||
end
|
||||
|
||||
scenario 'when organization is present', feature: true, js: true do
|
||||
create(:organization)
|
||||
visit root_path
|
||||
click_link admin.name
|
||||
|
||||
is_expected.to_not have_text('New Organization')
|
||||
is_expected.to have_text('New Conference')
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue