link to organization#new from user menu

This commit is contained in:
shlok007 2017-08-26 15:11:40 +05:30
parent d9b2ebfc36
commit 61ddbcfe04
3 changed files with 34 additions and 7 deletions

View 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