diff options
| author | cedricnjanga | 2017-09-12 14:07:22 +0200 |
|---|---|---|
| committer | cedricnjanga | 2017-09-12 14:07:22 +0200 |
| commit | 8f2e5c5c6ea8ed9be2830ebac250841e8c9247a6 (patch) | |
| tree | 41b5db408e936e382e607d8cf802b233851d63d2 /spec/features/users | |
| parent | 54a6da367724eeb303f527103ddfed6e32f56bed (diff) | |
| download | chouette-core-8f2e5c5c6ea8ed9be2830ebac250841e8c9247a6.tar.bz2 | |
Change some specs to have all the wokbenches name to be 'Gestion de l'offre' like in application controller
Diffstat (limited to 'spec/features/users')
| -rw-r--r-- | spec/features/users/user_edit_spec.rb | 1 | ||||
| -rw-r--r-- | spec/features/users/user_index_spec.rb | 1 | ||||
| -rw-r--r-- | spec/features/users/user_show_spec.rb | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/spec/features/users/user_edit_spec.rb b/spec/features/users/user_edit_spec.rb index 4b083a226..14995d8e5 100644 --- a/spec/features/users/user_edit_spec.rb +++ b/spec/features/users/user_edit_spec.rb @@ -36,6 +36,7 @@ feature 'User edit', :devise do # Then I see my own 'edit profile' page scenario "user cannot cannot edit another user's profile", :me do me = FactoryGirl.create(:user) + me.organisation.workbenches << create(:workbench) other = FactoryGirl.create(:user, email: 'other@example.com') login_as(me, :scope => :user) visit edit_user_registration_path(other) diff --git a/spec/features/users/user_index_spec.rb b/spec/features/users/user_index_spec.rb index 2a9199da3..b2dbdbb51 100644 --- a/spec/features/users/user_index_spec.rb +++ b/spec/features/users/user_index_spec.rb @@ -19,6 +19,7 @@ feature 'User index page', :devise do # Then I see my own email address scenario 'user sees own email address' do user = create(:user) + user.organisation.workbenches << create(:workbench) login_as(user, scope: :user) visit organisation_path expect(page).to have_content user.name.truncate(15) diff --git a/spec/features/users/user_show_spec.rb b/spec/features/users/user_show_spec.rb index d840d752c..ae3c25933 100644 --- a/spec/features/users/user_show_spec.rb +++ b/spec/features/users/user_show_spec.rb @@ -19,6 +19,7 @@ feature 'User profile page', :devise do # Then I see my own email address scenario 'user sees own profile' do user = FactoryGirl.create(:user) + user.organisation.workbenches << create(:workbench) login_as(user, :scope => :user) visit organisation_user_path(user) # FIXME ref #819 @@ -32,6 +33,7 @@ feature 'User profile page', :devise do # Then I see an 'access denied' message scenario "user cannot see another user's profile" do me = FactoryGirl.create(:user) + me.organisation.workbenches << create(:workbench) other = FactoryGirl.create(:user, email: 'other@example.com', :organisation => me.organisation) login_as(me, :scope => :user) Capybara.current_session.driver.header 'Referer', authenticated_root_path |
