diff options
author | Maxim Rydkin <maks.rydkin@gmail.com> | 2017-09-07 13:27:23 +0300 |
---|---|---|
committer | Maxim Rydkin <maks.rydkin@gmail.com> | 2017-09-07 13:27:23 +0300 |
commit | 091b1c5ed59b5c505d29c8905c78a867b12d5641 (patch) | |
tree | 790896fae824122c4d2435f379f56682c25d8b08 /spec/helpers/projects_helper_spec.rb | |
parent | 9151ca7bb37b7c0f36b0a1c6ba4ba1c37fd3660b (diff) | |
download | gitlab-ce-091b1c5ed59b5c505d29c8905c78a867b12d5641.tar.gz |
remove unnecessary args from `link_to_member_avatar` method in `app/helpers/projects_helper.rb`
Diffstat (limited to 'spec/helpers/projects_helper_spec.rb')
-rw-r--r-- | spec/helpers/projects_helper_spec.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb index 73ade811165..49cb7c954b4 100644 --- a/spec/helpers/projects_helper_spec.rb +++ b/spec/helpers/projects_helper_spec.rb @@ -195,23 +195,21 @@ describe ProjectsHelper do let(:user) { build_stubbed(:user) } let(:expected) { double } - it 'returns image tag for member avatar' do + before do expect(helper).to receive(:avatar_icon).with(user, 16).and_return(expected) + end + + it 'returns image tag for member avatar' do expect(helper).to receive(:image_tag).with(expected, { width: 16, class: ["avatar", "avatar-inline", "s16"], alt: "" }) helper.link_to_member_avatar(user) end it 'returns image tag with avatar class' do - expect(helper).to receive(:avatar_icon).with(user, 16).and_return(expected) expect(helper).to receive(:image_tag).with(expected, { width: 16, class: ["avatar", "avatar-inline", "s16", "any-avatar-class"], alt: "" }) helper.link_to_member_avatar(user, avatar_class: "any-avatar-class") end - - it 'returns no image tag if avatar is nil' do - expect(helper.link_to_member_avatar(user, avatar: nil)).to eq(nil) - end end describe '#link_to_member' do |