Skip to content
Snippets Groups Projects
Commit 7f833087 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent bbe24306
No related branches found
No related tags found
No related merge requests found
Loading
@@ -23,7 +23,7 @@ describe BlobEntity do
Loading
@@ -23,7 +23,7 @@ describe BlobEntity do
mode: "100644", mode: "100644",
readable_text: true, readable_text: true,
icon: "file-text-o", icon: "file-text-o",
url: "/#{project.full_path}/-/blob/master/bar/branch-test.txt" url: "/#{project.full_path}/blob/master/bar/branch-test.txt"
}) })
end end
end end
Loading
Loading
Loading
@@ -60,7 +60,7 @@ describe MergeRequestPollWidgetEntity do
Loading
@@ -60,7 +60,7 @@ describe MergeRequestPollWidgetEntity do
project.add_developer(user) project.add_developer(user)
   
expect(subject[:new_blob_path]) expect(subject[:new_blob_path])
.to eq("/#{resource.project.full_path}/-/new/#{resource.source_branch}") .to eq("/#{resource.project.full_path}/new/#{resource.source_branch}")
end end
end end
   
Loading
Loading
Loading
@@ -45,12 +45,12 @@ describe MergeRequestWidgetEntity do
Loading
@@ -45,12 +45,12 @@ describe MergeRequestWidgetEntity do
   
it 'has email_patches_path' do it 'has email_patches_path' do
expect(subject[:email_patches_path]) expect(subject[:email_patches_path])
.to eq("/#{resource.project.full_path}/-/merge_requests/#{resource.iid}.patch") .to eq("/#{resource.project.full_path}/merge_requests/#{resource.iid}.patch")
end end
   
it 'has plain_diff_path' do it 'has plain_diff_path' do
expect(subject[:plain_diff_path]) expect(subject[:plain_diff_path])
.to eq("/#{resource.project.full_path}/-/merge_requests/#{resource.iid}.diff") .to eq("/#{resource.project.full_path}/merge_requests/#{resource.iid}.diff")
end end
   
describe 'when source project is deleted' do describe 'when source project is deleted' do
Loading
Loading
Loading
@@ -26,7 +26,7 @@ describe PaginatedDiffEntity do
Loading
@@ -26,7 +26,7 @@ describe PaginatedDiffEntity do
expect(subject[:pagination]).to eq( expect(subject[:pagination]).to eq(
current_page: 2, current_page: 2,
next_page: 3, next_page: 3,
next_page_href: "/#{merge_request.project.full_path}/-/merge_requests/#{merge_request.iid}/diffs_batch.json?page=3", next_page_href: "/#{merge_request.project.full_path}/merge_requests/#{merge_request.iid}/diffs_batch.json?page=3",
total_pages: 7 total_pages: 7
) )
end end
Loading
Loading
Loading
@@ -11,7 +11,7 @@ describe Ci::ExpirePipelineCacheService do
Loading
@@ -11,7 +11,7 @@ describe Ci::ExpirePipelineCacheService do
describe '#execute' do describe '#execute' do
it 'invalidates Etag caching for project pipelines path' do it 'invalidates Etag caching for project pipelines path' do
pipelines_path = "/#{project.full_path}/pipelines.json" pipelines_path = "/#{project.full_path}/pipelines.json"
new_mr_pipelines_path = "/#{project.full_path}/-/merge_requests/new.json" new_mr_pipelines_path = "/#{project.full_path}/merge_requests/new.json"
pipeline_path = "/#{project.full_path}/pipelines/#{pipeline.id}.json" pipeline_path = "/#{project.full_path}/pipelines/#{pipeline.id}.json"
   
expect_any_instance_of(Gitlab::EtagCaching::Store).to receive(:touch).with(pipelines_path) expect_any_instance_of(Gitlab::EtagCaching::Store).to receive(:touch).with(pipelines_path)
Loading
@@ -24,7 +24,7 @@ describe Ci::ExpirePipelineCacheService do
Loading
@@ -24,7 +24,7 @@ describe Ci::ExpirePipelineCacheService do
it 'invalidates Etag caching for merge request pipelines if pipeline runs on any commit of that source branch' do it 'invalidates Etag caching for merge request pipelines if pipeline runs on any commit of that source branch' do
pipeline = create(:ci_empty_pipeline, status: 'created', project: project, ref: 'master') pipeline = create(:ci_empty_pipeline, status: 'created', project: project, ref: 'master')
merge_request = create(:merge_request, source_project: project, source_branch: pipeline.ref) merge_request = create(:merge_request, source_project: project, source_branch: pipeline.ref)
merge_request_pipelines_path = "/#{project.full_path}/-/merge_requests/#{merge_request.iid}/pipelines.json" merge_request_pipelines_path = "/#{project.full_path}/merge_requests/#{merge_request.iid}/pipelines.json"
   
allow_any_instance_of(Gitlab::EtagCaching::Store).to receive(:touch) allow_any_instance_of(Gitlab::EtagCaching::Store).to receive(:touch)
expect_any_instance_of(Gitlab::EtagCaching::Store).to receive(:touch).with(merge_request_pipelines_path) expect_any_instance_of(Gitlab::EtagCaching::Store).to receive(:touch).with(merge_request_pipelines_path)
Loading
Loading
Loading
@@ -8,8 +8,8 @@ describe MergeRequests::GetUrlsService do
Loading
@@ -8,8 +8,8 @@ describe MergeRequests::GetUrlsService do
let(:project) { create(:project, :public, :repository) } let(:project) { create(:project, :public, :repository) }
let(:service) { described_class.new(project) } let(:service) { described_class.new(project) }
let(:source_branch) { "merge-test" } let(:source_branch) { "merge-test" }
let(:new_merge_request_url) { "http://#{Gitlab.config.gitlab.host}/#{project.full_path}/-/merge_requests/new?merge_request%5Bsource_branch%5D=#{source_branch}" } let(:new_merge_request_url) { "http://#{Gitlab.config.gitlab.host}/#{project.full_path}/merge_requests/new?merge_request%5Bsource_branch%5D=#{source_branch}" }
let(:show_merge_request_url) { "http://#{Gitlab.config.gitlab.host}/#{project.full_path}/-/merge_requests/#{merge_request.iid}" } let(:show_merge_request_url) { "http://#{Gitlab.config.gitlab.host}/#{project.full_path}/merge_requests/#{merge_request.iid}" }
let(:new_branch_changes) { "#{Gitlab::Git::BLANK_SHA} 570e7b2abdd848b95f2f578043fc23bd6f6fd24d refs/heads/#{source_branch}" } let(:new_branch_changes) { "#{Gitlab::Git::BLANK_SHA} 570e7b2abdd848b95f2f578043fc23bd6f6fd24d refs/heads/#{source_branch}" }
let(:deleted_branch_changes) { "d14d6c0abdd253381df51a723d58691b2ee1ab08 #{Gitlab::Git::BLANK_SHA} refs/heads/#{source_branch}" } let(:deleted_branch_changes) { "d14d6c0abdd253381df51a723d58691b2ee1ab08 #{Gitlab::Git::BLANK_SHA} refs/heads/#{source_branch}" }
let(:existing_branch_changes) { "d14d6c0abdd253381df51a723d58691b2ee1ab08 570e7b2abdd848b95f2f578043fc23bd6f6fd24d refs/heads/#{source_branch}" } let(:existing_branch_changes) { "d14d6c0abdd253381df51a723d58691b2ee1ab08 570e7b2abdd848b95f2f578043fc23bd6f6fd24d refs/heads/#{source_branch}" }
Loading
@@ -127,7 +127,7 @@ describe MergeRequests::GetUrlsService do
Loading
@@ -127,7 +127,7 @@ describe MergeRequests::GetUrlsService do
let(:new_branch_changes) { "#{Gitlab::Git::BLANK_SHA} 570e7b2abdd848b95f2f578043fc23bd6f6fd24d refs/heads/new_branch" } let(:new_branch_changes) { "#{Gitlab::Git::BLANK_SHA} 570e7b2abdd848b95f2f578043fc23bd6f6fd24d refs/heads/new_branch" }
let(:existing_branch_changes) { "d14d6c0abdd253381df51a723d58691b2ee1ab08 570e7b2abdd848b95f2f578043fc23bd6f6fd24d refs/heads/markdown" } let(:existing_branch_changes) { "d14d6c0abdd253381df51a723d58691b2ee1ab08 570e7b2abdd848b95f2f578043fc23bd6f6fd24d refs/heads/markdown" }
let(:changes) { "#{new_branch_changes}\n#{existing_branch_changes}" } let(:changes) { "#{new_branch_changes}\n#{existing_branch_changes}" }
let(:new_merge_request_url) { "http://#{Gitlab.config.gitlab.host}/#{project.full_path}/-/merge_requests/new?merge_request%5Bsource_branch%5D=new_branch" } let(:new_merge_request_url) { "http://#{Gitlab.config.gitlab.host}/#{project.full_path}/merge_requests/new?merge_request%5Bsource_branch%5D=new_branch" }
   
it 'returns 2 urls for both creating new and showing merge request' do it 'returns 2 urls for both creating new and showing merge request' do
result = service.execute(changes) result = service.execute(changes)
Loading
Loading
Loading
@@ -328,7 +328,7 @@ describe SystemNoteService do
Loading
@@ -328,7 +328,7 @@ describe SystemNoteService do
url = if type == 'commit' url = if type == 'commit'
"#{Settings.gitlab.base_url}/#{project.namespace.path}/#{project.path}/commit/#{commit.id}" "#{Settings.gitlab.base_url}/#{project.namespace.path}/#{project.path}/commit/#{commit.id}"
else else
"#{Settings.gitlab.base_url}/#{project.namespace.path}/#{project.path}/-/merge_requests/#{merge_request.iid}" "#{Settings.gitlab.base_url}/#{project.namespace.path}/#{project.path}/merge_requests/#{merge_request.iid}"
end end
   
link = double(object: { 'url' => url }) link = double(object: { 'url' => url })
Loading
Loading
Loading
@@ -40,7 +40,7 @@ describe 'help/index' do
Loading
@@ -40,7 +40,7 @@ describe 'help/index' do
render render
   
expect(rendered).to match '8.0.2' expect(rendered).to match '8.0.2'
expect(rendered).to have_link('abcdefg', href: %r{https://gitlab.com/gitlab-org/(gitlab|gitlab-foss)/-/commits/abcdefg}) expect(rendered).to have_link('abcdefg', href: %r{https://gitlab.com/gitlab-org/(gitlab|gitlab-foss)/commits/abcdefg})
end end
end end
end end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment