summaryrefslogtreecommitdiff
path: root/spec/features/uploads/user_uploads_avatar_to_profile_spec.rb
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-02-28 09:54:12 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-02-28 09:54:12 +0000
commit6862e788e8b32196d750152c4657ea95d431e04f (patch)
treeb84746c1943e39ab6540954263b7fef4c4248d51 /spec/features/uploads/user_uploads_avatar_to_profile_spec.rb
parent61f65992a05e8fc5ab756ac0ce890d090c6cf4eb (diff)
parent7733f285aca97d444382a59eda0ea3e303539c26 (diff)
downloadgitlab-ce-6862e788e8b32196d750152c4657ea95d431e04f.tar.gz
Merge branch 'master' into add-svg-loader
* master: Fix migration without DOWNTIME clause specified Fix CSS classes fix missing @ symbol Update CHANGELOG.md for 8.16.7 Update CHANGELOG.md for 8.16.7 Update CHANGELOG.md for 8.16.7 Make RuboCop happy Add development fixtures for nested groups Align last column buttons with new environment button Removed jQuery UI draggable ensure webpack dev server proxy connects regardless of request headers Keep consistent in handling indexOf results Replace setInterval with setTimeout to prevent highly frequent requests Add feature specs for three types of user uploads Minor refactoring of Uploaders Fix #27840 - Improve the search bar experience on mobile Fix false positive caused by non-interpolated string use Fix inline comment images by removing wrapper #20890
Diffstat (limited to 'spec/features/uploads/user_uploads_avatar_to_profile_spec.rb')
-rw-r--r--spec/features/uploads/user_uploads_avatar_to_profile_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/features/uploads/user_uploads_avatar_to_profile_spec.rb b/spec/features/uploads/user_uploads_avatar_to_profile_spec.rb
new file mode 100644
index 00000000000..0dfd29045e5
--- /dev/null
+++ b/spec/features/uploads/user_uploads_avatar_to_profile_spec.rb
@@ -0,0 +1,24 @@
+require 'rails_helper'
+
+feature 'User uploads avatar to profile', feature: true do
+ scenario 'they see their new avatar' do
+ user = create(:user)
+ login_as(user)
+
+ visit profile_path
+ attach_file(
+ 'user_avatar',
+ Rails.root.join('spec', 'fixtures', 'dk.png'),
+ visible: false
+ )
+
+ click_button 'Update profile settings'
+
+ visit user_path(user)
+
+ expect(page).to have_selector(%Q(img[src$="/uploads/user/avatar/#{user.id}/dk.png"]))
+
+ # Cheating here to verify something that isn't user-facing, but is important
+ expect(user.reload.avatar.file).to exist
+ end
+end