osem-fcy/spec/features/user_menu_spec.rb

25 lines
607 B
Ruby
Raw Normal View History

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