diff options
Diffstat (limited to 'features')
-rw-r--r-- | features/steps/profile/profile.rb | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/features/steps/profile/profile.rb b/features/steps/profile/profile.rb index d9436e9e21a..bf9534be8be 100644 --- a/features/steps/profile/profile.rb +++ b/features/steps/profile/profile.rb @@ -27,7 +27,9 @@ class Spinach::Features::Profile < Spinach::FeatureSteps end step 'I change my avatar' do - attach_avatar + attach_file(:user_avatar, File.join(Rails.root, 'spec', 'fixtures', 'banana_sample.gif')) + click_button "Update profile settings" + @user.reload end step 'I should see new avatar' do @@ -40,7 +42,9 @@ class Spinach::Features::Profile < Spinach::FeatureSteps end step 'I have an avatar' do - attach_avatar + attach_file(:user_avatar, File.join(Rails.root, 'spec', 'fixtures', 'banana_sample.gif')) + click_button "Update profile settings" + @user.reload end step 'I remove my avatar' do @@ -229,16 +233,4 @@ class Spinach::Features::Profile < Spinach::FeatureSteps step "I see that application is removed" do expect(page.find(".oauth-applications")).not_to have_content "test_changed" end - - def attach_avatar - attach_file :user_avatar, Rails.root.join(*%w(spec fixtures banana_sample.gif)) - - page.find('#user_avatar_crop_x', visible: false).set('0') - page.find('#user_avatar_crop_y', visible: false).set('0') - page.find('#user_avatar_crop_size', visible: false).set('256') - - click_button "Update profile settings" - - @user.reload - end end |