|
14 | 14 | describe 'user_name_tag' do
|
15 | 15 | it 'should result right html in normal' do
|
16 | 16 | user = build(:user)
|
17 |
| - expect(helper.user_name_tag(user)).to eq(link_to(user.login, user_path(user.login), class: 'user-name', 'data-name' => user.name, 'data-turbolinks-action' => 'replace')) |
| 17 | + expect(helper.user_name_tag(user)).to eq(link_to(user.login, user_path(user.login), class: 'user-name', 'data-name' => user.name)) |
18 | 18 | end
|
19 | 19 |
|
20 | 20 | it 'should result right html with string param and downcase url' do
|
21 | 21 | login = 'Monster'
|
22 |
| - expect(helper.user_name_tag(login)).to eq(link_to(login, user_path(login), class: 'user-name', 'data-name' => login, 'data-turbolinks-action' => 'replace')) |
| 22 | + expect(helper.user_name_tag(login)).to eq(link_to(login, user_path(login), class: 'user-name', 'data-name' => login)) |
23 | 23 | end
|
24 | 24 |
|
25 | 25 | it 'should out name with Team' do
|
26 | 26 | user = build(:team)
|
27 |
| - expect(helper.user_name_tag(user)).to eq(link_to(user.name, user_path(user.login), class: 'team-name', 'data-name' => user.name, 'data-turbolinks-action' => 'replace')) |
| 27 | + expect(helper.user_name_tag(user)).to eq(link_to(user.name, user_path(user.login), class: 'team-name', 'data-name' => user.name)) |
28 | 28 | end
|
29 | 29 |
|
30 | 30 | it 'should result empty with nil param' do
|
|
40 | 40 | it 'should work if user exists' do
|
41 | 41 | user = create(:user)
|
42 | 42 | img = image_tag(user.letter_avatar_url(96), class: 'media-object avatar-48')
|
43 |
| - expect(user_avatar_tag(user)).to eq link_to(raw(img), user_path(user), 'data-turbolinks-action' => 'replace') |
| 43 | + expect(user_avatar_tag(user)).to eq link_to(raw(img), user_path(user)) |
44 | 44 | end
|
45 | 45 |
|
46 | 46 | it 'should work if avatar exist' do
|
47 | 47 | user = create(:avatar_user)
|
48 | 48 | image_url = user.avatar.url(:md)
|
49 | 49 | img = image_tag(image_url, class: 'media-object avatar-48')
|
50 |
| - expect(user_avatar_tag(user)).to eq link_to(raw(img), user_path(user), 'data-turbolinks-action' => 'replace') |
| 50 | + expect(user_avatar_tag(user)).to eq link_to(raw(img), user_path(user)) |
51 | 51 | end
|
52 | 52 |
|
53 | 53 | it 'should work with different size' do
|
|
58 | 58 | user = create(:avatar_user)
|
59 | 59 | image_url = user.avatar.url(:md) + "?t=#{user.updated_at.to_i}"
|
60 | 60 | img = image_tag(image_url, class: 'media-object avatar-48')
|
61 |
| - expect(user_avatar_tag(user, :md, timestamp: true)).to eq link_to(raw(img), user_path(user), 'data-turbolinks-action' => 'replace') |
| 61 | + expect(user_avatar_tag(user, :md, timestamp: true)).to eq link_to(raw(img), user_path(user)) |
62 | 62 | end
|
63 | 63 |
|
64 | 64 | it 'should work if link is false' do
|
|
0 commit comments