Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-23 11:32:21 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-23 11:32:21 +0300
commit4aa1fdd347d1df4001d9e1298e6dc09c0c478c2e (patch)
treefce20a5e5c571b20a7d934e7c1e12b8ca271ee30 /spec
parentcc9b5c49d1de2a9e1e90895700376793b9d614f6 (diff)
parentfe94254571a1de4a27a5440356345680a639e9fc (diff)
Merge branch 'fix-project-icon-links' into 'master'
Fix avatar tests to use banana_sample.gif Fixes tests that were broken in f5e0e5c0 due to the purge of `gitlab_logo.png`. See merge request !866
Diffstat (limited to 'spec')
-rw-r--r--spec/helpers/application_helper_spec.rb12
-rw-r--r--spec/helpers/groups_helper.rb4
2 files changed, 8 insertions, 8 deletions
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb
index 582c401c55a..8fd3d8f407b 100644
--- a/spec/helpers/application_helper_spec.rb
+++ b/spec/helpers/application_helper_spec.rb
@@ -40,15 +40,15 @@ describe ApplicationHelper do
end
describe 'project_icon' do
- avatar_file_path = File.join(Rails.root, 'public', 'gitlab_logo.png')
+ avatar_file_path = File.join(Rails.root, 'spec', 'fixtures', 'banana_sample.gif')
it 'should return an url for the avatar' do
project = create(:project)
project.avatar = File.open(avatar_file_path)
project.save!
- avatar_url = "http://localhost/uploads/project/avatar/#{ project.id }/gitlab_logo.png"
+ avatar_url = "http://localhost/uploads/project/avatar/#{ project.id }/banana_sample.gif"
expect(project_icon("#{project.namespace.to_param}/#{project.to_param}").to_s).to eq(
- "<img alt=\"Gitlab logo\" src=\"#{avatar_url}\" />"
+ "<img alt=\"Banana sample\" src=\"#{avatar_url}\" />"
)
end
@@ -65,14 +65,14 @@ describe ApplicationHelper do
end
describe 'avatar_icon' do
- avatar_file_path = File.join(Rails.root, 'public', 'gitlab_logo.png')
+ avatar_file_path = File.join(Rails.root, 'spec', 'fixtures', 'banana_sample.gif')
it 'should return an url for the avatar' do
user = create(:user)
user.avatar = File.open(avatar_file_path)
user.save!
expect(avatar_icon(user.email).to_s).
- to match("/uploads/user/avatar/#{ user.id }/gitlab_logo.png")
+ to match("/uploads/user/avatar/#{ user.id }/banana_sample.gif")
end
it 'should return an url for the avatar with relative url' do
@@ -83,7 +83,7 @@ describe ApplicationHelper do
user.avatar = File.open(avatar_file_path)
user.save!
expect(avatar_icon(user.email).to_s).
- to match("/gitlab/uploads/user/avatar/#{ user.id }/gitlab_logo.png")
+ to match("/gitlab/uploads/user/avatar/#{ user.id }/banana_sample.gif")
end
it 'should call gravatar_icon when no avatar is present' do
diff --git a/spec/helpers/groups_helper.rb b/spec/helpers/groups_helper.rb
index 3e99ab84ec9..5d174460681 100644
--- a/spec/helpers/groups_helper.rb
+++ b/spec/helpers/groups_helper.rb
@@ -2,14 +2,14 @@ require 'spec_helper'
describe GroupsHelper do
describe 'group_icon' do
- avatar_file_path = File.join(Rails.root, 'public', 'gitlab_logo.png')
+ avatar_file_path = File.join(Rails.root, 'spec', 'fixtures', 'banana_sample.gif')
it 'should return an url for the avatar' do
group = create(:group)
group.avatar = File.open(avatar_file_path)
group.save!
expect(group_icon(group.path).to_s).
- to match("/uploads/group/avatar/#{ group.id }/gitlab_logo.png")
+ to match("/uploads/group/avatar/#{ group.id }/banana_sample.gif")
end
it 'should give default avatar_icon when no avatar is present' do