diff options
author | Robert Speicher <rspeicher@gmail.com> | 2016-02-24 12:42:31 -0500 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-02-24 13:50:03 -0500 |
commit | 93e6282657b3c8498a9e705c6b4dc153ce6cade5 (patch) | |
tree | 2dc63ed5a3dd9e3508668cc9770ab63a5b6fb3b7 /spec/helpers/application_helper_spec.rb | |
parent | 0104ab79b3b6c6d532098bb98dc48f724633310f (diff) | |
download | gitlab-ce-93e6282657b3c8498a9e705c6b4dc153ce6cade5.tar.gz |
Add `:with_avatar` trait to User factory
Diffstat (limited to 'spec/helpers/application_helper_spec.rb')
-rw-r--r-- | spec/helpers/application_helper_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index f6c1005d265..8013b31524f 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -77,7 +77,7 @@ describe ApplicationHelper do let(:avatar_file_path) { File.join(Rails.root, 'spec', 'fixtures', 'banana_sample.gif') } it 'should return an url for the avatar' do - user = create(:user, avatar: File.open(avatar_file_path)) + user = create(:user, :with_avatar, avatar: File.open(avatar_file_path)) expect(helper.avatar_icon(user.email).to_s). to match("/uploads/user/avatar/#{user.id}/banana_sample.gif") @@ -88,7 +88,7 @@ describe ApplicationHelper do # Must be stubbed after the stub above, and separately stub_config_setting(url: Settings.send(:build_gitlab_url)) - user = create(:user, avatar: File.open(avatar_file_path)) + user = create(:user, :with_avatar, avatar: File.open(avatar_file_path)) expect(helper.avatar_icon(user.email).to_s). to match("/gitlab/uploads/user/avatar/#{user.id}/banana_sample.gif") @@ -102,7 +102,7 @@ describe ApplicationHelper do describe 'using a User' do it 'should return an URL for the avatar' do - user = create(:user, avatar: File.open(avatar_file_path)) + user = create(:user, :with_avatar, avatar: File.open(avatar_file_path)) expect(helper.avatar_icon(user).to_s). to match("/uploads/user/avatar/#{user.id}/banana_sample.gif") |