diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2015-10-12 18:22:22 +0300 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2015-10-15 13:05:01 +0300 |
commit | ff8f7fb0a111a5db2a50aa40e967cae699b0b245 (patch) | |
tree | c5f683e7b41dfb810bbf622c42fa1cf6c1e84122 /spec/helpers | |
parent | 949635636728fa388d983b180b7ab4e55aa8caa9 (diff) |
Re-use User for avatars in link_to_member
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/projects_helper_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb index 53e56ebff44..f2efb528aeb 100644 --- a/spec/helpers/projects_helper_spec.rb +++ b/spec/helpers/projects_helper_spec.rb @@ -70,4 +70,18 @@ describe ProjectsHelper do expect(helper.send(:readme_cache_key)).to eq("#{project.path_with_namespace}-nil-readme") end end + + describe 'link_to_member' do + let(:group) { create(:group) } + let(:project) { create(:empty_project, group: group) } + let(:user) { create(:user) } + + describe 'using the default options' do + it 'returns an HTML link to the user' do + link = helper.link_to_member(project, user) + + expect(link).to match(%r{/u/#{user.username}}) + end + end + end end |