summaryrefslogtreecommitdiff
path: root/spec/services/projects
diff options
context:
space:
mode:
authorblackst0ne <blackst0ne.ru@gmail.com>2017-05-10 15:26:17 +1100
committerblackst0ne <blackst0ne.ru@gmail.com>2017-05-10 15:26:17 +1100
commit29a3203b3fe08649b80def65b7750a866454d3d6 (patch)
treed4e644c142b1ecc6dd869c636ad5657c546d901b /spec/services/projects
parentecc6cc8be75b5c66fdf7f5595b71aabf9366a5e1 (diff)
downloadgitlab-ce-29a3203b3fe08649b80def65b7750a866454d3d6.tar.gz
Use relative paths for group/project/user avatars
Diffstat (limited to 'spec/services/projects')
-rw-r--r--spec/services/projects/participants_service_spec.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/services/projects/participants_service_spec.rb b/spec/services/projects/participants_service_spec.rb
index 063b3bd76eb..0657b7e93fe 100644
--- a/spec/services/projects/participants_service_spec.rb
+++ b/spec/services/projects/participants_service_spec.rb
@@ -6,7 +6,6 @@ describe Projects::ParticipantsService, services: true do
let(:project) { create(:empty_project, :public) }
let(:group) { create(:group, avatar: fixture_file_upload(Rails.root + 'spec/fixtures/dk.png')) }
let(:user) { create(:user) }
- let(:base_url) { Settings.send(:build_base_gitlab_url) }
let!(:group_member) { create(:group_member, group: group, user: user) }
it 'should return an url for the avatar' do
@@ -14,7 +13,7 @@ describe Projects::ParticipantsService, services: true do
groups = participants.groups
expect(groups.size).to eq 1
- expect(groups.first[:avatar_url]).to eq "#{base_url}/uploads/group/avatar/#{group.id}/dk.png"
+ expect(groups.first[:avatar_url]).to eq("/uploads/group/avatar/#{group.id}/dk.png")
end
it 'should return an url for the avatar with relative url' do
@@ -25,7 +24,7 @@ describe Projects::ParticipantsService, services: true do
groups = participants.groups
expect(groups.size).to eq 1
- expect(groups.first[:avatar_url]).to eq "#{base_url}/gitlab/uploads/group/avatar/#{group.id}/dk.png"
+ expect(groups.first[:avatar_url]).to eq("/gitlab/uploads/group/avatar/#{group.id}/dk.png")
end
end
end