Commit 7508f949 authored by Rémy Coutable's avatar Rémy Coutable

Resolve more conflicts

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 84597951
...@@ -7,13 +7,10 @@ module SubmoduleHelper ...@@ -7,13 +7,10 @@ module SubmoduleHelper
def submodule_links(submodule_item, ref = nil, repository = @repository) def submodule_links(submodule_item, ref = nil, repository = @repository)
url = repository.submodule_url_for(ref, submodule_item.path) url = repository.submodule_url_for(ref, submodule_item.path)
<<<<<<< HEAD
=======
if url == '.' || url == './' if url == '.' || url == './'
url = File.join(Gitlab.config.gitlab.url, @project.full_path) url = File.join(Gitlab.config.gitlab.url, @project.full_path)
end end
>>>>>>> upstream/master
if url =~ /([^\/:]+)\/([^\/]+(?:\.git)?)\Z/ if url =~ /([^\/:]+)\/([^\/]+(?:\.git)?)\Z/
namespace, project = $1, $2 namespace, project = $1, $2
project.sub!(/\.git\z/, '') project.sub!(/\.git\z/, '')
......
...@@ -128,17 +128,10 @@ class Group < Namespace ...@@ -128,17 +128,10 @@ class Group < Namespace
allowed_by_projects allowed_by_projects
end end
<<<<<<< HEAD
def avatar_url(size = nil, scale = nil)
if self[:avatar].present?
[gitlab_config.url, avatar.url].join
end
=======
def avatar_url(**args) def avatar_url(**args)
# We use avatar_path instead of overriding avatar_url because of carrierwave. # We use avatar_path instead of overriding avatar_url because of carrierwave.
# See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11001/diffs#note_28659864 # See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11001/diffs#note_28659864
avatar_path(args) avatar_path(args)
>>>>>>> upstream/master
end end
def lfs_enabled? def lfs_enabled?
......
...@@ -993,8 +993,14 @@ describe User, models: true do ...@@ -993,8 +993,14 @@ describe User, models: true do
let(:gitlab_host) { "http://#{Gitlab.config.gitlab.host}" } let(:gitlab_host) { "http://#{Gitlab.config.gitlab.host}" }
let(:avatar_path) { "/uploads/user/avatar/#{user.id}/dk.png" } let(:avatar_path) { "/uploads/user/avatar/#{user.id}/dk.png" }
<<<<<<< HEAD it 'shows correct avatar url' do
it { should eq "http://#{Gitlab.config.gitlab.host}#{avatar_path}" } expect(user.avatar_url).to eq(avatar_path)
expect(user.avatar_url(only_path: false)).to eq([gitlab_host, avatar_path].join)
allow(ActionController::Base).to receive(:asset_host).and_return(gitlab_host)
expect(user.avatar_url).to eq([gitlab_host, avatar_path].join)
end
context 'when in a geo secondary node' do context 'when in a geo secondary node' do
let(:geo_url) { 'http://geo.example.com' } let(:geo_url) { 'http://geo.example.com' }
...@@ -1005,15 +1011,6 @@ describe User, models: true do ...@@ -1005,15 +1011,6 @@ describe User, models: true do
end end
it { should eq "#{geo_url}#{avatar_path}" } it { should eq "#{geo_url}#{avatar_path}" }
=======
it 'shows correct avatar url' do
expect(user.avatar_url).to eq(avatar_path)
expect(user.avatar_url(only_path: false)).to eq([gitlab_host, avatar_path].join)
allow(ActionController::Base).to receive(:asset_host).and_return(gitlab_host)
expect(user.avatar_url).to eq([gitlab_host, avatar_path].join)
>>>>>>> upstream/master
end end
end end
end end
...@@ -1978,7 +1975,34 @@ describe User, models: true do ...@@ -1978,7 +1975,34 @@ describe User, models: true do
end end
end end
<<<<<<< HEAD context '#invalidate_issue_cache_counts' do
let(:user) { build_stubbed(:user) }
it 'invalidates cache for issue counter' do
cache_mock = double
expect(cache_mock).to receive(:delete).with(['users', user.id, 'assigned_open_issues_count'])
allow(Rails).to receive(:cache).and_return(cache_mock)
user.invalidate_issue_cache_counts
end
end
context '#invalidate_merge_request_cache_counts' do
let(:user) { build_stubbed(:user) }
it 'invalidates cache for Merge Request counter' do
cache_mock = double
expect(cache_mock).to receive(:delete).with(['users', user.id, 'assigned_open_merge_requests_count'])
allow(Rails).to receive(:cache).and_return(cache_mock)
user.invalidate_merge_request_cache_counts
end
end
describe '#forget_me!' do describe '#forget_me!' do
subject { create(:user, remember_created_at: Time.now) } subject { create(:user, remember_created_at: Time.now) }
...@@ -2008,33 +2032,6 @@ describe User, models: true do ...@@ -2008,33 +2032,6 @@ describe User, models: true do
allow(Gitlab::Geo).to receive(:secondary?) { true } allow(Gitlab::Geo).to receive(:secondary?) { true }
expect { subject.remember_me! }.not_to change(subject, :remember_created_at) expect { subject.remember_me! }.not_to change(subject, :remember_created_at)
=======
context '#invalidate_issue_cache_counts' do
let(:user) { build_stubbed(:user) }
it 'invalidates cache for issue counter' do
cache_mock = double
expect(cache_mock).to receive(:delete).with(['users', user.id, 'assigned_open_issues_count'])
allow(Rails).to receive(:cache).and_return(cache_mock)
user.invalidate_issue_cache_counts
end
end
context '#invalidate_merge_request_cache_counts' do
let(:user) { build_stubbed(:user) }
it 'invalidates cache for Merge Request counter' do
cache_mock = double
expect(cache_mock).to receive(:delete).with(['users', user.id, 'assigned_open_merge_requests_count'])
allow(Rails).to receive(:cache).and_return(cache_mock)
user.invalidate_merge_request_cache_counts
>>>>>>> upstream/master
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment