summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-18 21:07:37 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-18 21:07:37 +0000
commit7f8330873c1a5860b8a9a52d111083a65d210249 (patch)
treee6c7019f2942b8d2fff313545b7cb4bb996b6870 /spec
parentbbe243060399191abcba33c7ebd611f6ec34c6cd (diff)
downloadgitlab-ce-7f8330873c1a5860b8a9a52d111083a65d210249.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/concerns/metrics_dashboard_spec.rb2
-rw-r--r--spec/controllers/projects/blame_controller_spec.rb2
-rw-r--r--spec/controllers/projects/blob_controller_spec.rb4
-rw-r--r--spec/controllers/projects/branches_controller_spec.rb6
-rw-r--r--spec/controllers/projects/raw_controller_spec.rb2
-rw-r--r--spec/controllers/projects/tree_controller_spec.rb10
-rw-r--r--spec/controllers/projects_controller_spec.rb2
-rw-r--r--spec/frontend/notes/mock_data.js26
-rw-r--r--spec/frontend/repository/components/table/parent_row_spec.js8
-rw-r--r--spec/frontend/repository/components/table/row_spec.js2
-rw-r--r--spec/frontend/repository/router_spec.js10
-rw-r--r--spec/helpers/award_emoji_helper_spec.rb2
-rw-r--r--spec/helpers/blob_helper_spec.rb4
-rw-r--r--spec/helpers/events_helper_spec.rb2
-rw-r--r--spec/helpers/labels_helper_spec.rb10
-rw-r--r--spec/helpers/markup_helper_spec.rb2
-rw-r--r--spec/helpers/submodule_helper_spec.rb4
-rw-r--r--spec/javascripts/ide/stores/modules/commit/actions_spec.js2
-rw-r--r--spec/javascripts/jobs/components/stages_dropdown_spec.js2
-rw-r--r--spec/javascripts/merge_request_spec.js8
-rw-r--r--spec/javascripts/merge_request_tabs_spec.js34
-rw-r--r--spec/javascripts/notes/components/note_actions_spec.js2
-rw-r--r--spec/javascripts/vue_shared/components/diff_viewer/diff_viewer_spec.js4
-rw-r--r--spec/lib/banzai/filter/relative_link_filter_spec.rb38
-rw-r--r--spec/lib/gitlab/conflict/file_spec.rb2
-rw-r--r--spec/lib/gitlab/data_builder/pipeline_spec.rb2
-rw-r--r--spec/lib/gitlab/dependency_linker/godeps_json_linker_spec.rb4
-rw-r--r--spec/lib/gitlab/middleware/go_spec.rb2
-rw-r--r--spec/lib/gitlab/url_builder_spec.rb6
-rw-r--r--spec/models/project_services/chat_message/merge_message_spec.rb12
-rw-r--r--spec/models/project_spec.rb2
-rw-r--r--spec/presenters/blob_presenter_spec.rb2
-rw-r--r--spec/presenters/merge_request_presenter_spec.rb22
-rw-r--r--spec/presenters/tree_entry_presenter_spec.rb2
-rw-r--r--spec/requests/api/internal/base_spec.rb4
-rw-r--r--spec/requests/api/projects_spec.rb2
-rw-r--r--spec/requests/api/releases_spec.rb2
-rw-r--r--spec/requests/git_http_spec.rb4
-rw-r--r--spec/requests/projects/merge_requests_discussions_spec.rb2
-rw-r--r--spec/requests/user_activity_spec.rb4
-rw-r--r--spec/routing/project_routing_spec.rb106
-rw-r--r--spec/serializers/blob_entity_spec.rb2
-rw-r--r--spec/serializers/merge_request_poll_widget_entity_spec.rb2
-rw-r--r--spec/serializers/merge_request_widget_entity_spec.rb4
-rw-r--r--spec/serializers/paginated_diff_entity_spec.rb2
-rw-r--r--spec/services/ci/expire_pipeline_cache_service_spec.rb4
-rw-r--r--spec/services/merge_requests/get_urls_service_spec.rb6
-rw-r--r--spec/services/system_note_service_spec.rb2
-rw-r--r--spec/views/help/index.html.haml_spec.rb2
49 files changed, 181 insertions, 211 deletions
diff --git a/spec/controllers/concerns/metrics_dashboard_spec.rb b/spec/controllers/concerns/metrics_dashboard_spec.rb
index 662fb386208..ff2b6fbb8ec 100644
--- a/spec/controllers/concerns/metrics_dashboard_spec.rb
+++ b/spec/controllers/concerns/metrics_dashboard_spec.rb
@@ -72,7 +72,7 @@ describe MetricsDashboard do
it 'includes project_blob_path only for project dashboards' do
expect(system_dashboard['project_blob_path']).to be_nil
- expect(project_dashboard['project_blob_path']).to eq("/#{project.namespace.path}/#{project.name}/-/blob/master/.gitlab/dashboards/test.yml")
+ expect(project_dashboard['project_blob_path']).to eq("/#{project.namespace.path}/#{project.name}/blob/master/.gitlab/dashboards/test.yml")
end
describe 'project permissions' do
diff --git a/spec/controllers/projects/blame_controller_spec.rb b/spec/controllers/projects/blame_controller_spec.rb
index ac8394e3cd4..dd7c0f45dc2 100644
--- a/spec/controllers/projects/blame_controller_spec.rb
+++ b/spec/controllers/projects/blame_controller_spec.rb
@@ -36,7 +36,7 @@ describe Projects::BlameController do
it 'redirects' do
expect(subject)
- .to redirect_to("/#{project.full_path}/-/tree/master")
+ .to redirect_to("/#{project.full_path}/tree/master")
end
end
diff --git a/spec/controllers/projects/blob_controller_spec.rb b/spec/controllers/projects/blob_controller_spec.rb
index aa1dcdd9f1d..78599935910 100644
--- a/spec/controllers/projects/blob_controller_spec.rb
+++ b/spec/controllers/projects/blob_controller_spec.rb
@@ -33,7 +33,7 @@ describe Projects::BlobController do
it 'redirects' do
expect(subject)
- .to redirect_to("/#{project.full_path}/-/tree/master")
+ .to redirect_to("/#{project.full_path}/tree/master")
end
end
@@ -115,7 +115,7 @@ describe Projects::BlobController do
it 'redirects' do
expect(subject)
- .to redirect_to("/#{project.full_path}/-/tree/markdown/doc")
+ .to redirect_to("/#{project.full_path}/tree/markdown/doc")
end
end
end
diff --git a/spec/controllers/projects/branches_controller_spec.rb b/spec/controllers/projects/branches_controller_spec.rb
index bf7ef9dab0c..4f8ab6a5def 100644
--- a/spec/controllers/projects/branches_controller_spec.rb
+++ b/spec/controllers/projects/branches_controller_spec.rb
@@ -37,7 +37,7 @@ describe Projects::BranchesController do
let(:ref) { "master" }
it 'redirects' do
expect(subject)
- .to redirect_to("/#{project.full_path}/-/tree/merge_branch")
+ .to redirect_to("/#{project.full_path}/tree/merge_branch")
end
end
@@ -46,7 +46,7 @@ describe Projects::BranchesController do
let(:ref) { "master" }
it 'redirects' do
expect(subject)
- .to redirect_to("/#{project.full_path}/-/tree/alert('merge');")
+ .to redirect_to("/#{project.full_path}/tree/alert('merge');")
end
end
@@ -88,7 +88,7 @@ describe Projects::BranchesController do
}
expect(subject)
- .to redirect_to("/#{project.full_path}/-/tree/1-feature-branch")
+ .to redirect_to("/#{project.full_path}/tree/1-feature-branch")
end
it 'posts a system note' do
diff --git a/spec/controllers/projects/raw_controller_spec.rb b/spec/controllers/projects/raw_controller_spec.rb
index 391b7ad1648..bdf1c1a84d3 100644
--- a/spec/controllers/projects/raw_controller_spec.rb
+++ b/spec/controllers/projects/raw_controller_spec.rb
@@ -69,7 +69,7 @@ describe Projects::RawController do
env: :raw_blob_request_limit,
remote_ip: '0.0.0.0',
request_method: 'GET',
- path: "/#{project.full_path}/-/raw/#{file_path}"
+ path: "/#{project.full_path}/raw/#{file_path}"
}
expect(Gitlab::AuthLogger).to receive(:error).with(attributes).once
diff --git a/spec/controllers/projects/tree_controller_spec.rb b/spec/controllers/projects/tree_controller_spec.rb
index f89881af5e2..c0c11db5dd6 100644
--- a/spec/controllers/projects/tree_controller_spec.rb
+++ b/spec/controllers/projects/tree_controller_spec.rb
@@ -45,7 +45,7 @@ describe Projects::TreeController do
it 'redirects' do
expect(subject)
- .to redirect_to("/#{project.full_path}/-/tree/master")
+ .to redirect_to("/#{project.full_path}/tree/master")
end
end
@@ -60,7 +60,7 @@ describe Projects::TreeController do
it 'redirects' do
expect(subject)
- .to redirect_to("/#{project.full_path}/-/tree/empty-branch")
+ .to redirect_to("/#{project.full_path}/tree/empty-branch")
end
end
@@ -125,7 +125,7 @@ describe Projects::TreeController do
let(:id) { 'master/README.md' }
it 'redirects' do
- redirect_url = "/#{project.full_path}/-/blob/master/README.md"
+ redirect_url = "/#{project.full_path}/blob/master/README.md"
expect(subject)
.to redirect_to(redirect_url)
end
@@ -153,7 +153,7 @@ describe Projects::TreeController do
it 'redirects to the new directory' do
expect(subject)
- .to redirect_to("/#{project.full_path}/-/tree/#{branch_name}/#{path}")
+ .to redirect_to("/#{project.full_path}/tree/#{branch_name}/#{path}")
expect(flash[:notice]).to eq('The directory has been successfully created.')
end
end
@@ -164,7 +164,7 @@ describe Projects::TreeController do
it 'does not allow overwriting of existing files' do
expect(subject)
- .to redirect_to("/#{project.full_path}/-/tree/master")
+ .to redirect_to("/#{project.full_path}/tree/master")
expect(flash[:alert]).to eq('A file with this name already exists')
end
end
diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb
index a1dff0881b6..5259c612bbd 100644
--- a/spec/controllers/projects_controller_spec.rb
+++ b/spec/controllers/projects_controller_spec.rb
@@ -943,7 +943,7 @@ describe ProjectsController do
end
it 'renders JSON body with image links expanded' do
- expanded_path = "/#{project_with_repo.full_path}/-/raw/master/files/images/logo-white.png"
+ expanded_path = "/#{project_with_repo.full_path}/raw/master/files/images/logo-white.png"
post :preview_markdown, params: preview_markdown_params
diff --git a/spec/frontend/notes/mock_data.js b/spec/frontend/notes/mock_data.js
index 9ed79c61c22..01cb70d395c 100644
--- a/spec/frontend/notes/mock_data.js
+++ b/spec/frontend/notes/mock_data.js
@@ -52,7 +52,7 @@ export const noteableDataMock = {
time_estimate: 0,
title: '14',
total_time_spent: 0,
- noteable_note_url: '/group/project/-/merge_requests/1#note_1',
+ noteable_note_url: '/group/project/merge_requests/1#note_1',
updated_at: '2017-08-04T09:53:01.226Z',
updated_by_id: 1,
web_url: '/gitlab-org/gitlab-foss/issues/26',
@@ -101,8 +101,8 @@ export const individualNote = {
{ name: 'art', user: { id: 1, name: 'Root', username: 'root' } },
],
toggle_award_path: '/gitlab-org/gitlab-foss/notes/1390/toggle_award_emoji',
- noteable_note_url: '/group/project/-/merge_requests/1#note_1',
- note_url: '/group/project/-/merge_requests/1#note_1',
+ noteable_note_url: '/group/project/merge_requests/1#note_1',
+ note_url: '/group/project/merge_requests/1#note_1',
report_abuse_path:
'/abuse_reports/new?ref_url=http%3A%2F%2Flocalhost%3A3000%2Fgitlab-org%2Fgitlab-ce%2Fissues%2F26%23note_1390&user_id=1',
path: '/gitlab-org/gitlab-foss/notes/1390',
@@ -161,8 +161,8 @@ export const note = {
},
],
toggle_award_path: '/gitlab-org/gitlab-foss/notes/546/toggle_award_emoji',
- note_url: '/group/project/-/merge_requests/1#note_1',
- noteable_note_url: '/group/project/-/merge_requests/1#note_1',
+ note_url: '/group/project/merge_requests/1#note_1',
+ noteable_note_url: '/group/project/merge_requests/1#note_1',
report_abuse_path:
'/abuse_reports/new?ref_url=http%3A%2F%2Flocalhost%3A3000%2Fgitlab-org%2Fgitlab-ce%2Fissues%2F7%23note_546&user_id=1',
path: '/gitlab-org/gitlab-foss/notes/546',
@@ -205,7 +205,7 @@ export const discussionMock = {
discussion_id: '9e3bd2f71a01de45fd166e6719eb380ad9f270b1',
emoji_awardable: true,
award_emoji: [],
- noteable_note_url: '/group/project/-/merge_requests/1#note_1',
+ noteable_note_url: '/group/project/merge_requests/1#note_1',
toggle_award_path: '/gitlab-org/gitlab-foss/notes/1395/toggle_award_emoji',
report_abuse_path:
'/abuse_reports/new?ref_url=http%3A%2F%2Flocalhost%3A3000%2Fgitlab-org%2Fgitlab-ce%2Fissues%2F26%23note_1395&user_id=1',
@@ -253,7 +253,7 @@ export const discussionMock = {
emoji_awardable: true,
award_emoji: [],
toggle_award_path: '/gitlab-org/gitlab-foss/notes/1396/toggle_award_emoji',
- noteable_note_url: '/group/project/-/merge_requests/1#note_1',
+ noteable_note_url: '/group/project/merge_requests/1#note_1',
report_abuse_path:
'/abuse_reports/new?ref_url=http%3A%2F%2Flocalhost%3A3000%2Fgitlab-org%2Fgitlab-ce%2Fissues%2F26%23note_1396&user_id=1',
path: '/gitlab-org/gitlab-foss/notes/1396',
@@ -299,7 +299,7 @@ export const discussionMock = {
discussion_id: '9e3bd2f71a01de45fd166e6719eb380ad9f270b1',
emoji_awardable: true,
award_emoji: [],
- noteable_note_url: '/group/project/-/merge_requests/1#note_1',
+ noteable_note_url: '/group/project/merge_requests/1#note_1',
toggle_award_path: '/gitlab-org/gitlab-foss/notes/1437/toggle_award_emoji',
report_abuse_path:
'/abuse_reports/new?ref_url=http%3A%2F%2Flocalhost%3A3000%2Fgitlab-org%2Fgitlab-ce%2Fissues%2F26%23note_1437&user_id=1',
@@ -349,7 +349,7 @@ export const loggedOutnoteableData = {
can_create_note: false,
can_update: false,
},
- noteable_note_url: '/group/project/-/merge_requests/1#note_1',
+ noteable_note_url: '/group/project/merge_requests/1#note_1',
create_note_path: '/gitlab-org/gitlab-foss/notes?target_id=98&target_type=issue',
preview_note_path: '/gitlab-org/gitlab-foss/preview_markdown?target_id=98&target_type=Issue',
};
@@ -483,7 +483,7 @@ export const INDIVIDUAL_NOTE_RESPONSE_MAP = {
},
},
],
- noteable_note_url: '/group/project/-/merge_requests/1#note_1',
+ noteable_note_url: '/group/project/merge_requests/1#note_1',
toggle_award_path: '/gitlab-org/gitlab-foss/notes/1390/toggle_award_emoji',
report_abuse_path:
'/abuse_reports/new?ref_url=http%3A%2F%2Flocalhost%3A3000%2Fgitlab-org%2Fgitlab-ce%2Fissues%2F26%23note_1390\u0026user_id=1',
@@ -528,7 +528,7 @@ export const INDIVIDUAL_NOTE_RESPONSE_MAP = {
discussion_id: '70d5c92a4039a36c70100c6691c18c27e4b0a790',
emoji_awardable: true,
award_emoji: [],
- noteable_note_url: '/group/project/-/merge_requests/1#note_1',
+ noteable_note_url: '/group/project/merge_requests/1#note_1',
toggle_award_path: '/gitlab-org/gitlab-foss/notes/1391/toggle_award_emoji',
report_abuse_path:
'/abuse_reports/new?ref_url=http%3A%2F%2Flocalhost%3A3000%2Fgitlab-org%2Fgitlab-ce%2Fissues%2F26%23note_1391\u0026user_id=1',
@@ -583,7 +583,7 @@ export const INDIVIDUAL_NOTE_RESPONSE_MAP = {
discussion_id: 'a3ed36e29b1957efb3b68c53e2d7a2b24b1df052',
emoji_awardable: true,
award_emoji: [],
- noteable_note_url: '/group/project/-/merge_requests/1#note_1',
+ noteable_note_url: '/group/project/merge_requests/1#note_1',
toggle_award_path: '/gitlab-org/gitlab-foss/notes/1471/toggle_award_emoji',
report_abuse_path:
'/abuse_reports/new?ref_url=http%3A%2F%2Flocalhost%3A3000%2Fgitlab-org%2Fgitlab-ce%2Fissues%2F29%23note_1471\u0026user_id=1',
@@ -635,7 +635,7 @@ export const DISCUSSION_NOTE_RESPONSE_MAP = {
emoji_awardable: true,
award_emoji: [],
toggle_award_path: '/gitlab-org/gitlab-foss/notes/1471/toggle_award_emoji',
- noteable_note_url: '/group/project/-/merge_requests/1#note_1',
+ noteable_note_url: '/group/project/merge_requests/1#note_1',
report_abuse_path:
'/abuse_reports/new?ref_url=http%3A%2F%2Flocalhost%3A3000%2Fgitlab-org%2Fgitlab-ce%2Fissues%2F29%23note_1471\u0026user_id=1',
path: '/gitlab-org/gitlab-foss/notes/1471',
diff --git a/spec/frontend/repository/components/table/parent_row_spec.js b/spec/frontend/repository/components/table/parent_row_spec.js
index 63f84b2597b..7020055271f 100644
--- a/spec/frontend/repository/components/table/parent_row_spec.js
+++ b/spec/frontend/repository/components/table/parent_row_spec.js
@@ -30,8 +30,8 @@ describe('Repository parent row component', () => {
it.each`
path | to
- ${'app'} | ${'/-/tree/master/'}
- ${'app/assets'} | ${'/-/tree/master/app'}
+ ${'app'} | ${'/tree/master/'}
+ ${'app/assets'} | ${'/tree/master/app'}
`('renders link in $path to $to', ({ path, to }) => {
factory(path);
@@ -46,7 +46,7 @@ describe('Repository parent row component', () => {
vm.find('td').trigger('click');
expect($router.push).toHaveBeenCalledWith({
- path: '/-/tree/master/app',
+ path: '/tree/master/app',
});
});
@@ -58,7 +58,7 @@ describe('Repository parent row component', () => {
vm.find('a').trigger('click');
expect($router.push).not.toHaveBeenCalledWith({
- path: '/-/tree/master/app',
+ path: '/tree/master/app',
});
});
});
diff --git a/spec/frontend/repository/components/table/row_spec.js b/spec/frontend/repository/components/table/row_spec.js
index 3114b6a2eaa..94fa8b1e363 100644
--- a/spec/frontend/repository/components/table/row_spec.js
+++ b/spec/frontend/repository/components/table/row_spec.js
@@ -83,7 +83,7 @@ describe('Repository table row component', () => {
vm.trigger('click');
if (pushes) {
- expect($router.push).toHaveBeenCalledWith({ path: '/-/tree/master/test' });
+ expect($router.push).toHaveBeenCalledWith({ path: '/tree/master/test' });
} else {
expect($router.push).not.toHaveBeenCalled();
}
diff --git a/spec/frontend/repository/router_spec.js b/spec/frontend/repository/router_spec.js
index 1efd74a30c2..f61a0ccd1e6 100644
--- a/spec/frontend/repository/router_spec.js
+++ b/spec/frontend/repository/router_spec.js
@@ -4,11 +4,11 @@ import createRouter from '~/repository/router';
describe('Repository router spec', () => {
it.each`
- path | component | componentName
- ${'/'} | ${IndexPage} | ${'IndexPage'}
- ${'/-/tree/master'} | ${TreePage} | ${'TreePage'}
- ${'/-/tree/master/app/assets'} | ${TreePage} | ${'TreePage'}
- ${'/-/tree/123/app/assets'} | ${null} | ${'null'}
+ path | component | componentName
+ ${'/'} | ${IndexPage} | ${'IndexPage'}
+ ${'/tree/master'} | ${TreePage} | ${'TreePage'}
+ ${'/tree/master/app/assets'} | ${TreePage} | ${'TreePage'}
+ ${'/tree/123/app/assets'} | ${null} | ${'null'}
`('sets component as $componentName for path "$path"', ({ path, component }) => {
const router = createRouter('', 'master');
diff --git a/spec/helpers/award_emoji_helper_spec.rb b/spec/helpers/award_emoji_helper_spec.rb
index 975f32edd42..2ad6b68a34c 100644
--- a/spec/helpers/award_emoji_helper_spec.rb
+++ b/spec/helpers/award_emoji_helper_spec.rb
@@ -51,7 +51,7 @@ describe AwardEmojiHelper do
it 'returns correct url' do
@project = merge_request.project
- expected_url = "/#{@project.namespace.path}/#{@project.path}/-/merge_requests/#{merge_request.iid}/toggle_award_emoji"
+ expected_url = "/#{@project.namespace.path}/#{@project.path}/merge_requests/#{merge_request.iid}/toggle_award_emoji"
expect(subject).to eq(expected_url)
end
diff --git a/spec/helpers/blob_helper_spec.rb b/spec/helpers/blob_helper_spec.rb
index 2d0c4723648..4996e27c2e6 100644
--- a/spec/helpers/blob_helper_spec.rb
+++ b/spec/helpers/blob_helper_spec.rb
@@ -56,7 +56,7 @@ describe BlobHelper do
stub_feature_flags(web_ide_default: false)
link = helper.edit_blob_button(project, 'master', 'README.md')
- expect(Capybara.string(link).find_link('Edit')[:href]).to eq("/#{project.full_path}/-/edit/master/README.md")
+ expect(Capybara.string(link).find_link('Edit')[:href]).to eq("/#{project.full_path}/edit/master/README.md")
end
it 'returns a link with a Web IDE route' do
@@ -69,7 +69,7 @@ describe BlobHelper do
stub_feature_flags(web_ide_default: false)
link = helper.edit_blob_button(project, 'master', 'README.md', link_opts: { mr_id: 10 })
- expect(Capybara.string(link).find_link('Edit')[:href]).to eq("/#{project.full_path}/-/edit/master/README.md?mr_id=10")
+ expect(Capybara.string(link).find_link('Edit')[:href]).to eq("/#{project.full_path}/edit/master/README.md?mr_id=10")
end
end
diff --git a/spec/helpers/events_helper_spec.rb b/spec/helpers/events_helper_spec.rb
index fa553710274..9b28bc19185 100644
--- a/spec/helpers/events_helper_spec.rb
+++ b/spec/helpers/events_helper_spec.rb
@@ -116,7 +116,7 @@ describe EventsHelper do
it 'returns a merge request url' do
event.target = create(:note_on_merge_request, note: 'LGTM!')
- expect(subject).to eq("#{project_base_url}/-/merge_requests/#{event.note_target.iid}#note_#{event.target.id}")
+ expect(subject).to eq("#{project_base_url}/merge_requests/#{event.note_target.iid}#note_#{event.target.id}")
end
end
end
diff --git a/spec/helpers/labels_helper_spec.rb b/spec/helpers/labels_helper_spec.rb
index 7ad554fd618..3e92436241b 100644
--- a/spec/helpers/labels_helper_spec.rb
+++ b/spec/helpers/labels_helper_spec.rb
@@ -78,21 +78,13 @@ describe LabelsHelper do
end
context 'with a type argument' do
- ['issue', :issue].each do |type|
+ ['issue', :issue, 'merge_request', :merge_request].each do |type|
context "set to #{type}" do
it 'links to correct page' do
expect(link_to_label(label_presenter, type: type)).to match %r{<a href="/#{label.project.full_path}/#{type.to_s.pluralize}\?label_name%5B%5D=#{label.name}">.*</a>}
end
end
end
-
- ['merge_request', :merge_request].each do |type|
- context "set to #{type}" do
- it 'links to correct page' do
- expect(link_to_label(label_presenter, type: type)).to match %r{<a href="/#{label.project.full_path}/-/#{type.to_s.pluralize}\?label_name%5B%5D=#{label.name}">.*</a>}
- end
- end
- end
end
context 'with a tooltip argument' do
diff --git a/spec/helpers/markup_helper_spec.rb b/spec/helpers/markup_helper_spec.rb
index 6227a5f5662..fce0b5bd7e3 100644
--- a/spec/helpers/markup_helper_spec.rb
+++ b/spec/helpers/markup_helper_spec.rb
@@ -103,7 +103,7 @@ describe MarkupHelper do
let(:requested_path) { 'files/images/README.md' }
it 'returns the correct HTML for the image' do
- expanded_path = "/#{project.full_path}/-/raw/master/files/images/#{image_file}"
+ expanded_path = "/#{project.full_path}/raw/master/files/images/#{image_file}"
expect(subject.css('a')[0].attr('href')).to eq(expanded_path)
expect(subject.css('img')[0].attr('data-src')).to eq(expanded_path)
diff --git a/spec/helpers/submodule_helper_spec.rb b/spec/helpers/submodule_helper_spec.rb
index 9046c1e9fb4..fcfce0eaf31 100644
--- a/spec/helpers/submodule_helper_spec.rb
+++ b/spec/helpers/submodule_helper_spec.rb
@@ -95,7 +95,7 @@ describe SubmoduleHelper do
allow(repo).to receive(:project).and_return(project)
stub_url('./')
- expect(subject).to eq(["/master-project/#{project.path}", "/master-project/#{project.path}/-/tree/hash"])
+ expect(subject).to eq(["/master-project/#{project.path}", "/master-project/#{project.path}/tree/hash"])
end
end
@@ -166,7 +166,7 @@ describe SubmoduleHelper do
allow(repo).to receive(:submodule_url_for).and_return(relative_path)
result = subject
- expect(result).to eq([expected_path, "#{expected_path}/-/tree/#{submodule_item.id}"])
+ expect(result).to eq([expected_path, "#{expected_path}/tree/#{submodule_item.id}"])
end
it 'handles project under same group' do
diff --git a/spec/javascripts/ide/stores/modules/commit/actions_spec.js b/spec/javascripts/ide/stores/modules/commit/actions_spec.js
index 557244e237e..cbc2401262f 100644
--- a/spec/javascripts/ide/stores/modules/commit/actions_spec.js
+++ b/spec/javascripts/ide/stores/modules/commit/actions_spec.js
@@ -461,7 +461,7 @@ describe('IDE commit module actions', () => {
.dispatch('commit/commitChanges')
.then(() => {
expect(visitUrl).toHaveBeenCalledWith(
- `webUrl/-/merge_requests/new?merge_request[source_branch]=${
+ `webUrl/merge_requests/new?merge_request[source_branch]=${
store.getters['commit/placeholderBranchName']
}&merge_request[target_branch]=master&nav_source=webide`,
);
diff --git a/spec/javascripts/jobs/components/stages_dropdown_spec.js b/spec/javascripts/jobs/components/stages_dropdown_spec.js
index f1a01530104..e091aece564 100644
--- a/spec/javascripts/jobs/components/stages_dropdown_spec.js
+++ b/spec/javascripts/jobs/components/stages_dropdown_spec.js
@@ -27,7 +27,7 @@ describe('Stages Dropdown', () => {
},
merge_request: {
iid: 1234,
- path: '/root/detached-merge-request-pipelines/-/merge_requests/1',
+ path: '/root/detached-merge-request-pipelines/merge_requests/1',
title: 'Update README.md',
source_branch: 'feature-1234',
source_branch_path: '/root/detached-merge-request-pipelines/branches/feature-1234',
diff --git a/spec/javascripts/merge_request_spec.js b/spec/javascripts/merge_request_spec.js
index b6173b9b171..dc61482fdf3 100644
--- a/spec/javascripts/merge_request_spec.js
+++ b/spec/javascripts/merge_request_spec.js
@@ -17,7 +17,7 @@ describe('MergeRequest', function() {
mock = new MockAdapter(axios);
mock
- .onPatch(`${gl.TEST_HOST}/frontend-fixtures/merge-requests-project/-/merge_requests/1.json`)
+ .onPatch(`${gl.TEST_HOST}/frontend-fixtures/merge-requests-project/merge_requests/1.json`)
.reply(200, {});
this.merge = new MergeRequest();
@@ -75,7 +75,7 @@ describe('MergeRequest', function() {
setTimeout(() => {
expect(axios.patch).toHaveBeenCalledWith(
- `${gl.TEST_HOST}/frontend-fixtures/merge-requests-project/-/merge_requests/1.json`,
+ `${gl.TEST_HOST}/frontend-fixtures/merge-requests-project/merge_requests/1.json`,
{
merge_request: {
description: '- [ ] Task List Item\n- [ ] \n- [ ] Task List Item 2\n',
@@ -93,9 +93,7 @@ describe('MergeRequest', function() {
// eslint-disable-next-line jasmine/no-disabled-tests
xit('shows an error notification when tasklist update failed', done => {
mock
- .onPatch(
- `${gl.TEST_HOST}/frontend-fixtures/merge-requests-project/-/merge_requests/1.json`,
- )
+ .onPatch(`${gl.TEST_HOST}/frontend-fixtures/merge-requests-project/merge_requests/1.json`)
.reply(409, {});
$('.js-task-list-field').trigger({
diff --git a/spec/javascripts/merge_request_tabs_spec.js b/spec/javascripts/merge_request_tabs_spec.js
index 1672cf69485..73b1ea4d36f 100644
--- a/spec/javascripts/merge_request_tabs_spec.js
+++ b/spec/javascripts/merge_request_tabs_spec.js
@@ -147,53 +147,53 @@ describe('MergeRequestTabs', function() {
it('changes from commits', function() {
setLocation({
- pathname: '/foo/bar/-/merge_requests/1/commits',
+ pathname: '/foo/bar/merge_requests/1/commits',
});
- expect(this.subject('show')).toBe('/foo/bar/-/merge_requests/1');
- expect(this.subject('diffs')).toBe('/foo/bar/-/merge_requests/1/diffs');
+ expect(this.subject('show')).toBe('/foo/bar/merge_requests/1');
+ expect(this.subject('diffs')).toBe('/foo/bar/merge_requests/1/diffs');
});
it('changes from diffs', function() {
setLocation({
- pathname: '/foo/bar/-/merge_requests/1/diffs',
+ pathname: '/foo/bar/merge_requests/1/diffs',
});
- expect(this.subject('show')).toBe('/foo/bar/-/merge_requests/1');
- expect(this.subject('commits')).toBe('/foo/bar/-/merge_requests/1/commits');
+ expect(this.subject('show')).toBe('/foo/bar/merge_requests/1');
+ expect(this.subject('commits')).toBe('/foo/bar/merge_requests/1/commits');
});
it('changes from diffs.html', function() {
setLocation({
- pathname: '/foo/bar/-/merge_requests/1/diffs.html',
+ pathname: '/foo/bar/merge_requests/1/diffs.html',
});
- expect(this.subject('show')).toBe('/foo/bar/-/merge_requests/1');
- expect(this.subject('commits')).toBe('/foo/bar/-/merge_requests/1/commits');
+ expect(this.subject('show')).toBe('/foo/bar/merge_requests/1');
+ expect(this.subject('commits')).toBe('/foo/bar/merge_requests/1/commits');
});
it('changes from notes', function() {
setLocation({
- pathname: '/foo/bar/-/merge_requests/1',
+ pathname: '/foo/bar/merge_requests/1',
});
- expect(this.subject('diffs')).toBe('/foo/bar/-/merge_requests/1/diffs');
- expect(this.subject('commits')).toBe('/foo/bar/-/merge_requests/1/commits');
+ expect(this.subject('diffs')).toBe('/foo/bar/merge_requests/1/diffs');
+ expect(this.subject('commits')).toBe('/foo/bar/merge_requests/1/commits');
});
it('includes search parameters and hash string', function() {
setLocation({
- pathname: '/foo/bar/-/merge_requests/1/diffs',
+ pathname: '/foo/bar/merge_requests/1/diffs',
search: '?view=parallel',
hash: '#L15-35',
});
- expect(this.subject('show')).toBe('/foo/bar/-/merge_requests/1?view=parallel#L15-35');
+ expect(this.subject('show')).toBe('/foo/bar/merge_requests/1?view=parallel#L15-35');
});
it('replaces the current history state', function() {
setLocation({
- pathname: '/foo/bar/-/merge_requests/1',
+ pathname: '/foo/bar/merge_requests/1',
});
const newState = this.subject('commits');
@@ -208,10 +208,10 @@ describe('MergeRequestTabs', function() {
it('treats "show" like "notes"', function() {
setLocation({
- pathname: '/foo/bar/-/merge_requests/1/commits',
+ pathname: '/foo/bar/merge_requests/1/commits',
});
- expect(this.subject('show')).toBe('/foo/bar/-/merge_requests/1');
+ expect(this.subject('show')).toBe('/foo/bar/merge_requests/1');
});
});
diff --git a/spec/javascripts/notes/components/note_actions_spec.js b/spec/javascripts/notes/components/note_actions_spec.js
index a65e2fc31ad..2e0694869ba 100644
--- a/spec/javascripts/notes/components/note_actions_spec.js
+++ b/spec/javascripts/notes/components/note_actions_spec.js
@@ -30,7 +30,7 @@ describe('noteActions', () => {
canAwardEmoji: true,
canReportAsAbuse: true,
noteId: '539',
- noteUrl: `${TEST_HOST}/group/project/-/merge_requests/1#note_1`,
+ noteUrl: `${TEST_HOST}/group/project/merge_requests/1#note_1`,
reportAbusePath: `${TEST_HOST}/abuse_reports/new?ref_url=http%3A%2F%2Flocalhost%3A3000%2Fgitlab-org%2Fgitlab-ce%2Fissues%2F7%23note_539&user_id=26`,
showReply: false,
};
diff --git a/spec/javascripts/vue_shared/components/diff_viewer/diff_viewer_spec.js b/spec/javascripts/vue_shared/components/diff_viewer/diff_viewer_spec.js
index 6a83790093a..c743f1f6ad7 100644
--- a/spec/javascripts/vue_shared/components/diff_viewer/diff_viewer_spec.js
+++ b/spec/javascripts/vue_shared/components/diff_viewer/diff_viewer_spec.js
@@ -38,11 +38,11 @@ describe('DiffViewer', () => {
setTimeout(() => {
expect(vm.$el.querySelector('.deleted img').getAttribute('src')).toBe(
- `//-/raw/DEF/${RED_BOX_IMAGE_URL}`,
+ `//raw/DEF/${RED_BOX_IMAGE_URL}`,
);
expect(vm.$el.querySelector('.added img').getAttribute('src')).toBe(
- `//-/raw/ABC/${GREEN_BOX_IMAGE_URL}`,
+ `//raw/ABC/${GREEN_BOX_IMAGE_URL}`,
);
done();
diff --git a/spec/lib/banzai/filter/relative_link_filter_spec.rb b/spec/lib/banzai/filter/relative_link_filter_spec.rb
index 500df24ece8..a17a645d4d0 100644
--- a/spec/lib/banzai/filter/relative_link_filter_spec.rb
+++ b/spec/lib/banzai/filter/relative_link_filter_spec.rb
@@ -153,11 +153,11 @@ describe Banzai::Filter::RelativeLinkFilter do
it 'rebuilds absolute URL for a file in the repo' do
doc = filter(link('/doc/api/README.md'))
expect(doc.at_css('a')['href'])
- .to eq "/#{project_path}/-/blob/#{ref}/doc/api/README.md"
+ .to eq "/#{project_path}/blob/#{ref}/doc/api/README.md"
end
it 'does not modify relative URLs in system notes' do
- path = "#{project_path}/-/merge_requests/1/diffs"
+ path = "#{project_path}/merge_requests/1/diffs"
doc = filter(link(path), system_note: true)
expect(doc.at_css('a')['href']).to eq path
@@ -171,13 +171,13 @@ describe Banzai::Filter::RelativeLinkFilter do
it 'rebuilds relative URL for a file in the repo' do
doc = filter(link('doc/api/README.md'))
expect(doc.at_css('a')['href'])
- .to eq "/#{project_path}/-/blob/#{ref}/doc/api/README.md"
+ .to eq "/#{project_path}/blob/#{ref}/doc/api/README.md"
end
it 'rebuilds relative URL for a file in the repo with leading ./' do
doc = filter(link('./doc/api/README.md'))
expect(doc.at_css('a')['href'])
- .to eq "/#{project_path}/-/blob/#{ref}/doc/api/README.md"
+ .to eq "/#{project_path}/blob/#{ref}/doc/api/README.md"
end
it 'rebuilds relative URL for a file in the repo up one directory' do
@@ -185,7 +185,7 @@ describe Banzai::Filter::RelativeLinkFilter do
doc = filter(relative_link, requested_path: 'doc/update/7.14-to-8.0.md')
expect(doc.at_css('a')['href'])
- .to eq "/#{project_path}/-/blob/#{ref}/doc/api/README.md"
+ .to eq "/#{project_path}/blob/#{ref}/doc/api/README.md"
end
it 'rebuilds relative URL for a file in the repo up multiple directories' do
@@ -193,7 +193,7 @@ describe Banzai::Filter::RelativeLinkFilter do
doc = filter(relative_link, requested_path: 'doc/foo/bar/baz/README.md')
expect(doc.at_css('a')['href'])
- .to eq "/#{project_path}/-/blob/#{ref}/doc/api/README.md"
+ .to eq "/#{project_path}/blob/#{ref}/doc/api/README.md"
end
it 'rebuilds relative URL for a file in the repository root' do
@@ -201,47 +201,47 @@ describe Banzai::Filter::RelativeLinkFilter do
doc = filter(relative_link, requested_path: 'doc/some-file.md')
expect(doc.at_css('a')['href'])
- .to eq "/#{project_path}/-/blob/#{ref}/README.md"
+ .to eq "/#{project_path}/blob/#{ref}/README.md"
end
it 'rebuilds relative URL for a file in the repo with an anchor' do
doc = filter(link('README.md#section'))
expect(doc.at_css('a')['href'])
- .to eq "/#{project_path}/-/blob/#{ref}/README.md#section"
+ .to eq "/#{project_path}/blob/#{ref}/README.md#section"
end
it 'rebuilds relative URL for a directory in the repo' do
doc = filter(link('doc/api/'))
expect(doc.at_css('a')['href'])
- .to eq "/#{project_path}/-/tree/#{ref}/doc/api"
+ .to eq "/#{project_path}/tree/#{ref}/doc/api"
end
it 'rebuilds relative URL for an image in the repo' do
doc = filter(image('files/images/logo-black.png'))
expect(doc.at_css('img')['src'])
- .to eq "/#{project_path}/-/raw/#{ref}/files/images/logo-black.png"
+ .to eq "/#{project_path}/raw/#{ref}/files/images/logo-black.png"
end
it 'rebuilds relative URL for link to an image in the repo' do
doc = filter(link('files/images/logo-black.png'))
expect(doc.at_css('a')['href'])
- .to eq "/#{project_path}/-/raw/#{ref}/files/images/logo-black.png"
+ .to eq "/#{project_path}/raw/#{ref}/files/images/logo-black.png"
end
it 'rebuilds relative URL for a video in the repo' do
doc = filter(video('files/videos/intro.mp4'), commit: project.commit('video'), ref: 'video')
expect(doc.at_css('video')['src'])
- .to eq "/#{project_path}/-/raw/video/files/videos/intro.mp4"
+ .to eq "/#{project_path}/raw/video/files/videos/intro.mp4"
end
it 'rebuilds relative URL for audio in the repo' do
doc = filter(audio('files/audio/sample.wav'), commit: project.commit('audio'), ref: 'audio')
expect(doc.at_css('audio')['src'])
- .to eq "/#{project_path}/-/raw/audio/files/audio/sample.wav"
+ .to eq "/#{project_path}/raw/audio/files/audio/sample.wav"
end
it 'does not modify relative URL with an anchor only' do
@@ -268,7 +268,7 @@ describe Banzai::Filter::RelativeLinkFilter do
allow_any_instance_of(described_class).to receive(:uri_type).and_return(:raw)
doc = filter(image(escaped))
- expect(doc.at_css('img')['src']).to eq "/#{project_path}/-/raw/#{Addressable::URI.escape(ref)}/#{escaped}"
+ expect(doc.at_css('img')['src']).to eq "/#{project_path}/raw/#{Addressable::URI.escape(ref)}/#{escaped}"
end
context 'when requested path is a file in the repo' do
@@ -276,7 +276,7 @@ describe Banzai::Filter::RelativeLinkFilter do
it 'rebuilds URL relative to the containing directory' do
doc = filter(link('users.md'))
- expect(doc.at_css('a')['href']).to eq "/#{project_path}/-/blob/#{Addressable::URI.escape(ref)}/doc/api/users.md"
+ expect(doc.at_css('a')['href']).to eq "/#{project_path}/blob/#{Addressable::URI.escape(ref)}/doc/api/users.md"
end
end
@@ -285,7 +285,7 @@ describe Banzai::Filter::RelativeLinkFilter do
it 'rebuilds URL relative to the directory' do
doc = filter(link('users.md'))
- expect(doc.at_css('a')['href']).to eq "/#{project_path}/-/blob/#{Addressable::URI.escape(ref)}/doc/api/users.md"
+ expect(doc.at_css('a')['href']).to eq "/#{project_path}/blob/#{Addressable::URI.escape(ref)}/doc/api/users.md"
end
end
@@ -296,7 +296,7 @@ describe Banzai::Filter::RelativeLinkFilter do
it 'correctly escapes the ref' do
doc = filter(link('.gitkeep'))
- expect(doc.at_css('a')['href']).to eq "/#{project_path}/-/blob/#{Addressable::URI.escape(ref)}/foo/bar/.gitkeep"
+ expect(doc.at_css('a')['href']).to eq "/#{project_path}/blob/#{Addressable::URI.escape(ref)}/foo/bar/.gitkeep"
end
end
@@ -315,7 +315,7 @@ describe Banzai::Filter::RelativeLinkFilter do
doc = filter(link(path))
expect(doc.at_css('a')['href'])
- .to eq "/#{project_path}/-/raw/#{ref_escaped}/files/images/logo-black.png"
+ .to eq "/#{project_path}/raw/#{ref_escaped}/files/images/logo-black.png"
end
end
@@ -326,7 +326,7 @@ describe Banzai::Filter::RelativeLinkFilter do
it 'does not escape the space twice' do
doc = filter(link('README.md'))
- expect(doc.at_css('a')['href']).to eq "/#{project_path}/-/blob/#{Addressable::URI.escape(ref)}/with%20space/README.md"
+ expect(doc.at_css('a')['href']).to eq "/#{project_path}/blob/#{Addressable::URI.escape(ref)}/with%20space/README.md"
end
end
end
diff --git a/spec/lib/gitlab/conflict/file_spec.rb b/spec/lib/gitlab/conflict/file_spec.rb
index 7ecc42ea497..adf5a232a75 100644
--- a/spec/lib/gitlab/conflict/file_spec.rb
+++ b/spec/lib/gitlab/conflict/file_spec.rb
@@ -258,7 +258,7 @@ FILE
describe '#as_json' do
it 'includes the blob path for the file' do
expect(conflict_file.as_json[:blob_path])
- .to eq("/#{project.full_path}/-/blob/#{our_commit.oid}/files/ruby/regex.rb")
+ .to eq("/#{project.full_path}/blob/#{our_commit.oid}/files/ruby/regex.rb")
end
it 'includes the blob icon for the file' do
diff --git a/spec/lib/gitlab/data_builder/pipeline_spec.rb b/spec/lib/gitlab/data_builder/pipeline_spec.rb
index 86ab7f888ca..635bf56b72e 100644
--- a/spec/lib/gitlab/data_builder/pipeline_spec.rb
+++ b/spec/lib/gitlab/data_builder/pipeline_spec.rb
@@ -77,7 +77,7 @@ describe Gitlab::DataBuilder::Pipeline do
expect(merge_request_attrs[:target_project_id]).to eq(merge_request.target_project_id)
expect(merge_request_attrs[:state]).to eq(merge_request.state)
expect(merge_request_attrs[:merge_status]).to eq(merge_request.merge_status)
- expect(merge_request_attrs[:url]).to eq("http://localhost/#{merge_request.target_project.full_path}/-/merge_requests/#{merge_request.iid}")
+ expect(merge_request_attrs[:url]).to eq("http://localhost/#{merge_request.target_project.full_path}/merge_requests/#{merge_request.iid}")
end
end
end
diff --git a/spec/lib/gitlab/dependency_linker/godeps_json_linker_spec.rb b/spec/lib/gitlab/dependency_linker/godeps_json_linker_spec.rb
index 7128689e362..9f8542a76c9 100644
--- a/spec/lib/gitlab/dependency_linker/godeps_json_linker_spec.rb
+++ b/spec/lib/gitlab/dependency_linker/godeps_json_linker_spec.rb
@@ -75,8 +75,8 @@ describe Gitlab::DependencyLinker::GodepsJsonLinker do
end
it 'links GitLab projects' do
- expect(subject).to include(link('gitlab.com/group/project/path', 'https://gitlab.com/group/project/-/tree/master/path'))
- expect(subject).to include(link('gitlab.com/group/subgroup/project.git/path', 'https://gitlab.com/group/subgroup/project/-/tree/master/path'))
+ expect(subject).to include(link('gitlab.com/group/project/path', 'https://gitlab.com/group/project/tree/master/path'))
+ expect(subject).to include(link('gitlab.com/group/subgroup/project.git/path', 'https://gitlab.com/group/subgroup/project/tree/master/path'))
end
it 'links Golang packages' do
diff --git a/spec/lib/gitlab/middleware/go_spec.rb b/spec/lib/gitlab/middleware/go_spec.rb
index 99c2a364dfc..2b90035d148 100644
--- a/spec/lib/gitlab/middleware/go_spec.rb
+++ b/spec/lib/gitlab/middleware/go_spec.rb
@@ -241,7 +241,7 @@ describe Gitlab::Middleware::Go do
project_url = "http://#{Gitlab.config.gitlab.host}/#{path}"
expect(response[0]).to eq(200)
expect(response[1]['Content-Type']).to eq('text/html')
- expected_body = %{<html><head><meta name="go-import" content="#{Gitlab.config.gitlab.host}/#{path} git #{repository_url}" /><meta name="go-source" content="#{Gitlab.config.gitlab.host}/#{path} #{project_url} #{project_url}/-/tree/#{branch}{/dir} #{project_url}/-/blob/#{branch}{/dir}/{file}#L{line}" /></head><body>go get #{Gitlab.config.gitlab.url}/#{path}</body></html>}
+ expected_body = %{<html><head><meta name="go-import" content="#{Gitlab.config.gitlab.host}/#{path} git #{repository_url}" /><meta name="go-source" content="#{Gitlab.config.gitlab.host}/#{path} #{project_url} #{project_url}/tree/#{branch}{/dir} #{project_url}/blob/#{branch}{/dir}/{file}#L{line}" /></head><body>go get #{Gitlab.config.gitlab.url}/#{path}</body></html>}
expect(response[2].body).to eq([expected_body])
end
end
diff --git a/spec/lib/gitlab/url_builder_spec.rb b/spec/lib/gitlab/url_builder_spec.rb
index d349c2928b0..0aab02b6c4c 100644
--- a/spec/lib/gitlab/url_builder_spec.rb
+++ b/spec/lib/gitlab/url_builder_spec.rb
@@ -55,7 +55,7 @@ describe Gitlab::UrlBuilder do
url = described_class.build(merge_request)
- expect(url).to eq "#{Settings.gitlab['url']}/#{merge_request.project.full_path}/-/merge_requests/#{merge_request.iid}"
+ expect(url).to eq "#{Settings.gitlab['url']}/#{merge_request.project.full_path}/merge_requests/#{merge_request.iid}"
end
end
@@ -118,7 +118,7 @@ describe Gitlab::UrlBuilder do
url = described_class.build(note)
- expect(url).to eq "#{Settings.gitlab['url']}/#{merge_request.project.full_path}/-/merge_requests/#{merge_request.iid}#note_#{note.id}"
+ expect(url).to eq "#{Settings.gitlab['url']}/#{merge_request.project.full_path}/merge_requests/#{merge_request.iid}#note_#{note.id}"
end
end
@@ -129,7 +129,7 @@ describe Gitlab::UrlBuilder do
url = described_class.build(note)
- expect(url).to eq "#{Settings.gitlab['url']}/#{merge_request.project.full_path}/-/merge_requests/#{merge_request.iid}#note_#{note.id}"
+ expect(url).to eq "#{Settings.gitlab['url']}/#{merge_request.project.full_path}/merge_requests/#{merge_request.iid}#note_#{note.id}"
end
end
diff --git a/spec/models/project_services/chat_message/merge_message_spec.rb b/spec/models/project_services/chat_message/merge_message_spec.rb
index 150ee6f7472..b56eb19dd55 100644
--- a/spec/models/project_services/chat_message/merge_message_spec.rb
+++ b/spec/models/project_services/chat_message/merge_message_spec.rb
@@ -52,7 +52,7 @@ describe ChatMessage::MergeMessage do
context 'open' do
it 'returns a message regarding opening of merge requests' do
expect(subject.pretext).to eq(
- 'Test User (test.user) opened <http://somewhere.com/-/merge_requests/100|!100 *Merge Request title*> in <http://somewhere.com|project_name>')
+ 'Test User (test.user) opened <http://somewhere.com/merge_requests/100|!100 *Merge Request title*> in <http://somewhere.com|project_name>')
expect(subject.attachments).to be_empty
end
end
@@ -63,7 +63,7 @@ describe ChatMessage::MergeMessage do
end
it 'returns a message regarding closing of merge requests' do
expect(subject.pretext).to eq(
- 'Test User (test.user) closed <http://somewhere.com/-/merge_requests/100|!100 *Merge Request title*> in <http://somewhere.com|project_name>')
+ 'Test User (test.user) closed <http://somewhere.com/merge_requests/100|!100 *Merge Request title*> in <http://somewhere.com|project_name>')
expect(subject.attachments).to be_empty
end
end
@@ -77,12 +77,12 @@ describe ChatMessage::MergeMessage do
context 'open' do
it 'returns a message regarding opening of merge requests' do
expect(subject.pretext).to eq(
- 'Test User (test.user) opened [!100 *Merge Request title*](http://somewhere.com/-/merge_requests/100) in [project_name](http://somewhere.com)')
+ 'Test User (test.user) opened [!100 *Merge Request title*](http://somewhere.com/merge_requests/100) in [project_name](http://somewhere.com)')
expect(subject.attachments).to be_empty
expect(subject.activity).to eq({
title: 'Merge Request opened by Test User (test.user)',
subtitle: 'in [project_name](http://somewhere.com)',
- text: '[!100 *Merge Request title*](http://somewhere.com/-/merge_requests/100)',
+ text: '[!100 *Merge Request title*](http://somewhere.com/merge_requests/100)',
image: 'http://someavatar.com'
})
end
@@ -95,12 +95,12 @@ describe ChatMessage::MergeMessage do
it 'returns a message regarding closing of merge requests' do
expect(subject.pretext).to eq(
- 'Test User (test.user) closed [!100 *Merge Request title*](http://somewhere.com/-/merge_requests/100) in [project_name](http://somewhere.com)')
+ 'Test User (test.user) closed [!100 *Merge Request title*](http://somewhere.com/merge_requests/100) in [project_name](http://somewhere.com)')
expect(subject.attachments).to be_empty
expect(subject.activity).to eq({
title: 'Merge Request closed by Test User (test.user)',
subtitle: 'in [project_name](http://somewhere.com)',
- text: '[!100 *Merge Request title*](http://somewhere.com/-/merge_requests/100)',
+ text: '[!100 *Merge Request title*](http://somewhere.com/merge_requests/100)',
image: 'http://someavatar.com'
})
end
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 7170003857e..99d7e4d156f 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -697,7 +697,7 @@ describe Project do
let(:project) { create(:project, :repository) }
it 'returns the README' do
- expect(project.readme_url).to eq("#{project.web_url}/-/blob/master/README.md")
+ expect(project.readme_url).to eq("#{project.web_url}/blob/master/README.md")
end
end
end
diff --git a/spec/presenters/blob_presenter_spec.rb b/spec/presenters/blob_presenter_spec.rb
index ee7bfd1256d..8680e8b9b45 100644
--- a/spec/presenters/blob_presenter_spec.rb
+++ b/spec/presenters/blob_presenter_spec.rb
@@ -21,7 +21,7 @@ describe BlobPresenter, :seed_helper do
subject { described_class.new(blob) }
- it { expect(subject.web_url).to eq("http://localhost/#{project.full_path}/-/blob/#{blob.commit_id}/#{blob.path}") }
+ it { expect(subject.web_url).to eq("http://localhost/#{project.full_path}/blob/#{blob.commit_id}/#{blob.path}") }
end
describe '#highlight' do
diff --git a/spec/presenters/merge_request_presenter_spec.rb b/spec/presenters/merge_request_presenter_spec.rb
index 025f083ab27..ce437090d43 100644
--- a/spec/presenters/merge_request_presenter_spec.rb
+++ b/spec/presenters/merge_request_presenter_spec.rb
@@ -101,7 +101,7 @@ describe MergeRequestPresenter do
allow(presenter).to receive_message_chain(:conflicts, :can_be_resolved_by?).with(user) { true }
expect(path)
- .to eq("/#{project.full_path}/-/merge_requests/#{resource.iid}/conflicts")
+ .to eq("/#{project.full_path}/merge_requests/#{resource.iid}/conflicts")
end
end
end
@@ -179,7 +179,7 @@ describe MergeRequestPresenter do
it 'returns correct link with correct text' do
is_expected
- .to match("#{project.full_path}/-/merge_requests/#{resource.iid}/assign_related_issues")
+ .to match("#{project.full_path}/merge_requests/#{resource.iid}/assign_related_issues")
is_expected
.to match("Assign yourself to this issue")
@@ -192,7 +192,7 @@ describe MergeRequestPresenter do
it 'returns correct link with correct text' do
is_expected
- .to match("#{project.full_path}/-/merge_requests/#{resource.iid}/assign_related_issues")
+ .to match("#{project.full_path}/merge_requests/#{resource.iid}/assign_related_issues")
is_expected
.to match("Assign yourself to these issues")
@@ -221,7 +221,7 @@ describe MergeRequestPresenter do
.with(user)
.and_return(true)
- is_expected.to eq("/#{resource.project.full_path}/-/merge_requests/#{resource.iid}/cancel_auto_merge")
+ is_expected.to eq("/#{resource.project.full_path}/merge_requests/#{resource.iid}/cancel_auto_merge")
end
end
@@ -248,7 +248,7 @@ describe MergeRequestPresenter do
.and_return(true)
is_expected
- .to eq("/#{resource.project.full_path}/-/merge_requests/#{resource.iid}/merge")
+ .to eq("/#{resource.project.full_path}/merge_requests/#{resource.iid}/merge")
end
end
@@ -312,7 +312,7 @@ describe MergeRequestPresenter do
project.add_maintainer(user)
is_expected
- .to eq("/#{resource.project.full_path}/-/merge_requests/#{resource.iid}/remove_wip")
+ .to eq("/#{resource.project.full_path}/merge_requests/#{resource.iid}/remove_wip")
end
end
@@ -334,7 +334,7 @@ describe MergeRequestPresenter do
allow(resource).to receive(:target_branch_exists?) { true }
is_expected
- .to eq("/#{resource.target_project.full_path}/-/commits/#{resource.target_branch}")
+ .to eq("/#{resource.target_project.full_path}/commits/#{resource.target_branch}")
end
end
@@ -358,7 +358,7 @@ describe MergeRequestPresenter do
allow(resource).to receive(:source_branch_exists?) { true }
is_expected
- .to eq("/#{resource.source_project.full_path}/-/commits/#{resource.source_branch}")
+ .to eq("/#{resource.source_project.full_path}/commits/#{resource.source_branch}")
end
end
@@ -382,7 +382,7 @@ describe MergeRequestPresenter do
allow(resource).to receive(:target_branch_exists?) { true }
is_expected
- .to eq("/#{resource.target_project.full_path}/-/tree/#{resource.target_branch}")
+ .to eq("/#{resource.target_project.full_path}/tree/#{resource.target_branch}")
end
end
@@ -496,7 +496,7 @@ describe MergeRequestPresenter do
allow(resource).to receive(:source_branch_exists?) { true }
is_expected
- .to eq("<a href=\"/#{resource.source_project.full_path}/-/tree/#{resource.source_branch}\">#{resource.source_branch}</a>")
+ .to eq("<a href=\"/#{resource.source_project.full_path}/tree/#{resource.source_branch}\">#{resource.source_branch}</a>")
end
it 'escapes html, when source_branch does not exist' do
@@ -535,7 +535,7 @@ describe MergeRequestPresenter do
it 'returns path' do
is_expected
- .to eq("/#{project.full_path}/-/merge_requests/#{resource.iid}/rebase")
+ .to eq("/#{project.full_path}/merge_requests/#{resource.iid}/rebase")
end
end
diff --git a/spec/presenters/tree_entry_presenter_spec.rb b/spec/presenters/tree_entry_presenter_spec.rb
index 0c29fe3e5ff..d74ee5dc28f 100644
--- a/spec/presenters/tree_entry_presenter_spec.rb
+++ b/spec/presenters/tree_entry_presenter_spec.rb
@@ -11,6 +11,6 @@ describe TreeEntryPresenter do
let(:presenter) { described_class.new(tree) }
describe '.web_url' do
- it { expect(presenter.web_url).to eq("http://localhost/#{project.full_path}/-/tree/#{tree.commit_id}/#{tree.path}") }
+ it { expect(presenter.web_url).to eq("http://localhost/#{project.full_path}/tree/#{tree.commit_id}/#{tree.path}") }
end
end
diff --git a/spec/requests/api/internal/base_spec.rb b/spec/requests/api/internal/base_spec.rb
index d38b7eafe97..ecbb81294a0 100644
--- a/spec/requests/api/internal/base_spec.rb
+++ b/spec/requests/api/internal/base_spec.rb
@@ -852,7 +852,7 @@ describe API::Internal::Base do
message = <<~MESSAGE.strip
To create a merge request for #{branch_name}, visit:
- http://#{Gitlab.config.gitlab.host}/#{project.full_path}/-/merge_requests/new?merge_request%5Bsource_branch%5D=#{branch_name}
+ http://#{Gitlab.config.gitlab.host}/#{project.full_path}/merge_requests/new?merge_request%5Bsource_branch%5D=#{branch_name}
MESSAGE
expect(json_response['messages']).to include(build_basic_message(message))
@@ -909,7 +909,7 @@ describe API::Internal::Base do
message = <<~MESSAGE.strip
View merge request for #{branch_name}:
- http://#{Gitlab.config.gitlab.host}/#{project.full_path}/-/merge_requests/1
+ http://#{Gitlab.config.gitlab.host}/#{project.full_path}/merge_requests/1
MESSAGE
expect(json_response['messages']).to include(build_basic_message(message))
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb
index eb3d5e698d8..9af4f484f99 100644
--- a/spec/requests/api/projects_spec.rb
+++ b/spec/requests/api/projects_spec.rb
@@ -715,7 +715,7 @@ describe API::Projects do
post api('/projects', user), params: project
- expect(json_response['readme_url']).to eql("#{Gitlab.config.gitlab.url}/#{json_response['namespace']['full_path']}/somewhere/-/blob/master/README.md")
+ expect(json_response['readme_url']).to eql("#{Gitlab.config.gitlab.url}/#{json_response['namespace']['full_path']}/somewhere/blob/master/README.md")
end
it 'sets tag list to a project' do
diff --git a/spec/requests/api/releases_spec.rb b/spec/requests/api/releases_spec.rb
index 534dced16bf..da04e852795 100644
--- a/spec/requests/api/releases_spec.rb
+++ b/spec/requests/api/releases_spec.rb
@@ -76,7 +76,7 @@ describe API::Releases do
mr_uri = URI.parse(links['merge_requests_url'])
issue_uri = URI.parse(links['issues_url'])
- expect(mr_uri.path).to eq("#{path_base}/-/merge_requests")
+ expect(mr_uri.path).to eq("#{path_base}/merge_requests")
expect(issue_uri.path).to eq("#{path_base}/issues")
expect(mr_uri.query).to eq(expected_query)
expect(issue_uri.query).to eq(expected_query)
diff --git a/spec/requests/git_http_spec.rb b/spec/requests/git_http_spec.rb
index 7424b7ee8d0..42b4bd71b88 100644
--- a/spec/requests/git_http_spec.rb
+++ b/spec/requests/git_http_spec.rb
@@ -834,7 +834,7 @@ describe 'Git HTTP requests' do
Blob.decorate(Gitlab::Git::Blob.find(project.repository, 'master', 'bar/branch-test.txt'), project)
end
- get "/#{project.full_path}/-/blob/master/info/refs"
+ get "/#{project.full_path}/blob/master/info/refs"
end
it "returns the file" do
@@ -844,7 +844,7 @@ describe 'Git HTTP requests' do
context "when the file does not exist" do
before do
- get "/#{project.full_path}/-/blob/master/info/refs"
+ get "/#{project.full_path}/blob/master/info/refs"
end
it "redirects" do
diff --git a/spec/requests/projects/merge_requests_discussions_spec.rb b/spec/requests/projects/merge_requests_discussions_spec.rb
index ffc98d09e5c..5945561aa7b 100644
--- a/spec/requests/projects/merge_requests_discussions_spec.rb
+++ b/spec/requests/projects/merge_requests_discussions_spec.rb
@@ -4,7 +4,7 @@ require 'spec_helper'
describe 'merge requests discussions' do
# Further tests can be found at merge_requests_controller_spec.rb
- describe 'GET /:namespace/:project/-/merge_requests/:iid/discussions' do
+ describe 'GET /:namespace/:project/merge_requests/:iid/discussions' do
let(:project) { create(:project, :repository) }
let(:user) { project.owner }
let(:merge_request) { create(:merge_request_with_diffs, target_project: project, source_project: project) }
diff --git a/spec/requests/user_activity_spec.rb b/spec/requests/user_activity_spec.rb
index 3cd4911098a..15666e00b9f 100644
--- a/spec/requests/user_activity_spec.rb
+++ b/spec/requests/user_activity_spec.rb
@@ -26,8 +26,8 @@ describe 'Update of user activity' do
'/dashboard/todos',
'/group/project/issues',
'/group/project/issues/10',
- '/group/project/-/merge_requests',
- '/group/project/-/merge_requests/15'
+ '/group/project/merge_requests',
+ '/group/project/merge_requests/15'
]
context 'without an authenticated user' do
diff --git a/spec/routing/project_routing_spec.rb b/spec/routing/project_routing_spec.rb
index 7816b77d14c..287db20448a 100644
--- a/spec/routing/project_routing_spec.rb
+++ b/spec/routing/project_routing_spec.rb
@@ -292,77 +292,71 @@ describe 'project routing' do
describe Projects::MergeRequestsController, 'routing' do
it 'to #commits' do
- expect(get('/gitlab/gitlabhq/-/merge_requests/1/commits.json')).to route_to('projects/merge_requests#commits', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1', format: 'json')
+ expect(get('/gitlab/gitlabhq/merge_requests/1/commits.json')).to route_to('projects/merge_requests#commits', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1', format: 'json')
end
it 'to #pipelines' do
- expect(get('/gitlab/gitlabhq/-/merge_requests/1/pipelines.json')).to route_to('projects/merge_requests#pipelines', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1', format: 'json')
+ expect(get('/gitlab/gitlabhq/merge_requests/1/pipelines.json')).to route_to('projects/merge_requests#pipelines', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1', format: 'json')
end
it 'to #merge' do
- expect(post('/gitlab/gitlabhq/-/merge_requests/1/merge')).to route_to(
+ expect(post('/gitlab/gitlabhq/merge_requests/1/merge')).to route_to(
'projects/merge_requests#merge',
namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1'
)
end
it 'to #show' do
- expect(get('/gitlab/gitlabhq/-/merge_requests/1.diff')).to route_to('projects/merge_requests#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1', format: 'diff')
- expect(get('/gitlab/gitlabhq/-/merge_requests/1.patch')).to route_to('projects/merge_requests#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1', format: 'patch')
- expect(get('/gitlab/gitlabhq/-/merge_requests/1/diffs')).to route_to('projects/merge_requests#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1', tab: 'diffs')
- expect(get('/gitlab/gitlabhq/-/merge_requests/1/commits')).to route_to('projects/merge_requests#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1', tab: 'commits')
- expect(get('/gitlab/gitlabhq/-/merge_requests/1/pipelines')).to route_to('projects/merge_requests#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1', tab: 'pipelines')
+ expect(get('/gitlab/gitlabhq/merge_requests/1.diff')).to route_to('projects/merge_requests#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1', format: 'diff')
+ expect(get('/gitlab/gitlabhq/merge_requests/1.patch')).to route_to('projects/merge_requests#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1', format: 'patch')
+ expect(get('/gitlab/gitlabhq/merge_requests/1/diffs')).to route_to('projects/merge_requests#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1', tab: 'diffs')
+ expect(get('/gitlab/gitlabhq/merge_requests/1/commits')).to route_to('projects/merge_requests#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1', tab: 'commits')
+ expect(get('/gitlab/gitlabhq/merge_requests/1/pipelines')).to route_to('projects/merge_requests#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1', tab: 'pipelines')
end
it_behaves_like 'RESTful project resources' do
let(:controller) { 'merge_requests' }
let(:actions) { [:index, :edit, :show, :update] }
- let(:controller_path) { '/-/merge_requests' }
end
-
- it_behaves_like 'redirecting a legacy project path', "/gitlab/gitlabhq/merge_requests", "/gitlab/gitlabhq/-/merge_requests"
- it_behaves_like 'redirecting a legacy project path', "/gitlab/gitlabhq/merge_requests/1/diffs", "/gitlab/gitlabhq/-/merge_requests/1/diffs"
end
describe Projects::MergeRequests::CreationsController, 'routing' do
it 'to #new' do
- expect(get('/gitlab/gitlabhq/-/merge_requests/new')).to route_to('projects/merge_requests/creations#new', namespace_id: 'gitlab', project_id: 'gitlabhq')
- expect(get('/gitlab/gitlabhq/-/merge_requests/new/diffs')).to route_to('projects/merge_requests/creations#new', namespace_id: 'gitlab', project_id: 'gitlabhq', tab: 'diffs')
- expect(get('/gitlab/gitlabhq/-/merge_requests/new/pipelines')).to route_to('projects/merge_requests/creations#new', namespace_id: 'gitlab', project_id: 'gitlabhq', tab: 'pipelines')
+ expect(get('/gitlab/gitlabhq/merge_requests/new')).to route_to('projects/merge_requests/creations#new', namespace_id: 'gitlab', project_id: 'gitlabhq')
+ expect(get('/gitlab/gitlabhq/merge_requests/new/diffs')).to route_to('projects/merge_requests/creations#new', namespace_id: 'gitlab', project_id: 'gitlabhq', tab: 'diffs')
+ expect(get('/gitlab/gitlabhq/merge_requests/new/pipelines')).to route_to('projects/merge_requests/creations#new', namespace_id: 'gitlab', project_id: 'gitlabhq', tab: 'pipelines')
end
it 'to #create' do
- expect(post('/gitlab/gitlabhq/-/merge_requests')).to route_to('projects/merge_requests/creations#create', namespace_id: 'gitlab', project_id: 'gitlabhq')
+ expect(post('/gitlab/gitlabhq/merge_requests')).to route_to('projects/merge_requests/creations#create', namespace_id: 'gitlab', project_id: 'gitlabhq')
end
it 'to #branch_from' do
- expect(get('/gitlab/gitlabhq/-/merge_requests/new/branch_from')).to route_to('projects/merge_requests/creations#branch_from', namespace_id: 'gitlab', project_id: 'gitlabhq')
+ expect(get('/gitlab/gitlabhq/merge_requests/new/branch_from')).to route_to('projects/merge_requests/creations#branch_from', namespace_id: 'gitlab', project_id: 'gitlabhq')
end
it 'to #branch_to' do
- expect(get('/gitlab/gitlabhq/-/merge_requests/new/branch_to')).to route_to('projects/merge_requests/creations#branch_to', namespace_id: 'gitlab', project_id: 'gitlabhq')
+ expect(get('/gitlab/gitlabhq/merge_requests/new/branch_to')).to route_to('projects/merge_requests/creations#branch_to', namespace_id: 'gitlab', project_id: 'gitlabhq')
end
it 'to #pipelines' do
- expect(get('/gitlab/gitlabhq/-/merge_requests/new/pipelines.json')).to route_to('projects/merge_requests/creations#pipelines', namespace_id: 'gitlab', project_id: 'gitlabhq', format: 'json')
+ expect(get('/gitlab/gitlabhq/merge_requests/new/pipelines.json')).to route_to('projects/merge_requests/creations#pipelines', namespace_id: 'gitlab', project_id: 'gitlabhq', format: 'json')
end
it 'to #diffs' do
- expect(get('/gitlab/gitlabhq/-/merge_requests/new/diffs.json')).to route_to('projects/merge_requests/creations#diffs', namespace_id: 'gitlab', project_id: 'gitlabhq', format: 'json')
+ expect(get('/gitlab/gitlabhq/merge_requests/new/diffs.json')).to route_to('projects/merge_requests/creations#diffs', namespace_id: 'gitlab', project_id: 'gitlabhq', format: 'json')
end
-
- it_behaves_like 'redirecting a legacy project path', "/gitlab/gitlabhq/merge_requests/new", "/gitlab/gitlabhq/-/merge_requests/new"
end
describe Projects::MergeRequests::DiffsController, 'routing' do
it 'to #show' do
- expect(get('/gitlab/gitlabhq/-/merge_requests/1/diffs.json')).to route_to('projects/merge_requests/diffs#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1', format: 'json')
+ expect(get('/gitlab/gitlabhq/merge_requests/1/diffs.json')).to route_to('projects/merge_requests/diffs#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1', format: 'json')
end
end
describe Projects::MergeRequests::ConflictsController, 'routing' do
it 'to #show' do
- expect(get('/gitlab/gitlabhq/-/merge_requests/1/conflicts')).to route_to('projects/merge_requests/conflicts#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1')
+ expect(get('/gitlab/gitlabhq/merge_requests/1/conflicts')).to route_to('projects/merge_requests/conflicts#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: '1')
end
end
# raw_project_snippet GET /:project_id/snippets/:id/raw(.:format) snippets#raw
@@ -454,14 +448,11 @@ describe 'project routing' do
it_behaves_like 'RESTful project resources' do
let(:actions) { [:show] }
let(:controller) { 'commits' }
- let(:controller_path) { '/-/commits' }
end
it 'to #show' do
- expect(get('/gitlab/gitlabhq/-/commits/master.atom')).to route_to('projects/commits#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master.atom')
+ expect(get('/gitlab/gitlabhq/commits/master.atom')).to route_to('projects/commits#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master.atom')
end
-
- it_behaves_like 'redirecting a legacy project path', "/gitlab/gitlabhq/commits/master.atom", "/gitlab/gitlabhq/-/commits/master.atom"
end
# project_project_members GET /:project_id/project_members(.:format) project_members#index
@@ -553,68 +544,62 @@ describe 'project routing' do
# project_blame GET /:project_id/blame/:id(.:format) blame#show {id: /[^\0]+/, project_id: /[^\/]+/}
describe Projects::BlameController, 'routing' do
it 'to #show' do
- expect(get('/gitlab/gitlabhq/-/blame/master/app/models/project.rb')).to route_to('projects/blame#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master/app/models/project.rb')
- expect(get('/gitlab/gitlabhq/-/blame/master/files.scss')).to route_to('projects/blame#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master/files.scss')
+ expect(get('/gitlab/gitlabhq/blame/master/app/models/project.rb')).to route_to('projects/blame#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master/app/models/project.rb')
+ expect(get('/gitlab/gitlabhq/blame/master/files.scss')).to route_to('projects/blame#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master/files.scss')
newline_file = "new\n\nline.txt"
url_encoded_newline_file = ERB::Util.url_encode(newline_file)
- assert_routing({ path: "/gitlab/gitlabhq/-/blame/master/#{url_encoded_newline_file}",
+ assert_routing({ path: "/gitlab/gitlabhq/blame/master/#{url_encoded_newline_file}",
method: :get },
{ controller: 'projects/blame', action: 'show',
namespace_id: 'gitlab', project_id: 'gitlabhq',
id: "master/#{newline_file}" })
end
-
- it_behaves_like 'redirecting a legacy project path', "/gitlab/gitlabhq/blame/master/readme.md", "/gitlab/gitlabhq/-/blame/master/readme.md"
end
# project_blob GET /:project_id/blob/:id(.:format) blob#show {id: /[^\0]+/, project_id: /[^\/]+/}
describe Projects::BlobController, 'routing' do
it 'to #show' do
- expect(get('/gitlab/gitlabhq/-/blob/master/app/models/project.rb')).to route_to('projects/blob#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master/app/models/project.rb')
- expect(get('/gitlab/gitlabhq/-/blob/master/app/models/compare.rb')).to route_to('projects/blob#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master/app/models/compare.rb')
- expect(get('/gitlab/gitlabhq/-/blob/master/app/models/diff.js')).to route_to('projects/blob#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master/app/models/diff.js')
- expect(get('/gitlab/gitlabhq/-/blob/master/files.scss')).to route_to('projects/blob#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master/files.scss')
- expect(get('/gitlab/gitlabhq/-/blob/master/blob/index.js')).to route_to('projects/blob#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master/blob/index.js')
- expect(get('/gitlab/gitlabhq/-/blob/blob/master/blob/index.js')).to route_to('projects/blob#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'blob/master/blob/index.js')
+ expect(get('/gitlab/gitlabhq/blob/master/app/models/project.rb')).to route_to('projects/blob#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master/app/models/project.rb')
+ expect(get('/gitlab/gitlabhq/blob/master/app/models/compare.rb')).to route_to('projects/blob#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master/app/models/compare.rb')
+ expect(get('/gitlab/gitlabhq/blob/master/app/models/diff.js')).to route_to('projects/blob#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master/app/models/diff.js')
+ expect(get('/gitlab/gitlabhq/blob/master/files.scss')).to route_to('projects/blob#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master/files.scss')
+ expect(get('/gitlab/gitlabhq/blob/master/blob/index.js')).to route_to('projects/blob#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master/blob/index.js')
+ expect(get('/gitlab/gitlabhq/blob/blob/master/blob/index.js')).to route_to('projects/blob#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'blob/master/blob/index.js')
newline_file = "new\n\nline.txt"
url_encoded_newline_file = ERB::Util.url_encode(newline_file)
- assert_routing({ path: "/gitlab/gitlabhq/-/blob/blob/master/blob/#{url_encoded_newline_file}",
+ assert_routing({ path: "/gitlab/gitlabhq/blob/blob/master/blob/#{url_encoded_newline_file}",
method: :get },
{ controller: 'projects/blob', action: 'show',
namespace_id: 'gitlab', project_id: 'gitlabhq',
id: "blob/master/blob/#{newline_file}" })
end
-
- it_behaves_like 'redirecting a legacy project path', "/gitlab/gitlabhq/blob/master/readme.md", "/gitlab/gitlabhq/-/blob/master/readme.md"
end
# project_tree GET /:project_id/tree/:id(.:format) tree#show {id: /[^\0]+/, project_id: /[^\/]+/}
describe Projects::TreeController, 'routing' do
it 'to #show' do
- expect(get('/gitlab/gitlabhq/-/tree/master/app/models/project.rb')).to route_to('projects/tree#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master/app/models/project.rb')
- expect(get('/gitlab/gitlabhq/-/tree/master/files.scss')).to route_to('projects/tree#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master/files.scss')
- expect(get('/gitlab/gitlabhq/-/tree/master/tree/files')).to route_to('projects/tree#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master/tree/files')
- expect(get('/gitlab/gitlabhq/-/tree/tree/master/tree/files')).to route_to('projects/tree#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'tree/master/tree/files')
+ expect(get('/gitlab/gitlabhq/tree/master/app/models/project.rb')).to route_to('projects/tree#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master/app/models/project.rb')
+ expect(get('/gitlab/gitlabhq/tree/master/files.scss')).to route_to('projects/tree#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master/files.scss')
+ expect(get('/gitlab/gitlabhq/tree/master/tree/files')).to route_to('projects/tree#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master/tree/files')
+ expect(get('/gitlab/gitlabhq/tree/tree/master/tree/files')).to route_to('projects/tree#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'tree/master/tree/files')
newline_file = "new\n\nline.txt"
url_encoded_newline_file = ERB::Util.url_encode(newline_file)
- assert_routing({ path: "/gitlab/gitlabhq/-/tree/master/#{url_encoded_newline_file}",
+ assert_routing({ path: "/gitlab/gitlabhq/tree/master/#{url_encoded_newline_file}",
method: :get },
{ controller: 'projects/tree', action: 'show',
namespace_id: 'gitlab', project_id: 'gitlabhq',
id: "master/#{newline_file}" })
end
-
- it_behaves_like 'redirecting a legacy project path', "/gitlab/gitlabhq/tree/master/app", "/gitlab/gitlabhq/-/tree/master/app"
end
# project_find_file GET /:namespace_id/:project_id/find_file/*id(.:format) projects/find_file#show {:id=>/[^\0]+/, :namespace_id=>/[a-zA-Z.0-9_\-]+/, :project_id=>/[a-zA-Z.0-9_\-]+(?<!\.atom)/, :format=>/html/}
# project_files GET /:namespace_id/:project_id/files/*id(.:format) projects/find_file#list {:id=>/(?:[^.]|\.(?!json$))+/, :namespace_id=>/[a-zA-Z.0-9_\-]+/, :project_id=>/[a-zA-Z.0-9_\-]+(?<!\.atom)/, :format=>/json/}
describe Projects::FindFileController, 'routing' do
it 'to #show' do
- expect(get('/gitlab/gitlabhq/-/find_file/master')).to route_to('projects/find_file#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master')
+ expect(get('/gitlab/gitlabhq/find_file/master')).to route_to('projects/find_file#show', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master')
newline_file = "new\n\nline.txt"
url_encoded_newline_file = ERB::Util.url_encode(newline_file)
- assert_routing({ path: "/gitlab/gitlabhq/-/find_file/#{url_encoded_newline_file}",
+ assert_routing({ path: "/gitlab/gitlabhq/find_file/#{url_encoded_newline_file}",
method: :get },
{ controller: 'projects/find_file', action: 'show',
namespace_id: 'gitlab', project_id: 'gitlabhq',
@@ -622,29 +607,26 @@ describe 'project routing' do
end
it 'to #list' do
- expect(get('/gitlab/gitlabhq/-/files/master.json')).to route_to('projects/find_file#list', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master.json')
+ expect(get('/gitlab/gitlabhq/files/master.json')).to route_to('projects/find_file#list', namespace_id: 'gitlab', project_id: 'gitlabhq', id: 'master.json')
newline_file = "new\n\nline.txt"
url_encoded_newline_file = ERB::Util.url_encode(newline_file)
- assert_routing({ path: "/gitlab/gitlabhq/-/files/#{url_encoded_newline_file}",
+ assert_routing({ path: "/gitlab/gitlabhq/files/#{url_encoded_newline_file}",
method: :get },
{ controller: 'projects/find_file', action: 'list',
namespace_id: 'gitlab', project_id: 'gitlabhq',
id: "#{newline_file}" })
end
-
- it_behaves_like 'redirecting a legacy project path', "/gitlab/gitlabhq/find_file/master", "/gitlab/gitlabhq/-/find_file/master"
- it_behaves_like 'redirecting a legacy project path', "/gitlab/gitlabhq/files/master.json", "/gitlab/gitlabhq/-/files/master.json"
end
describe Projects::BlobController, 'routing' do
it 'to #edit' do
- expect(get('/gitlab/gitlabhq/-/edit/master/app/models/project.rb')).to(
+ expect(get('/gitlab/gitlabhq/edit/master/app/models/project.rb')).to(
route_to('projects/blob#edit',
namespace_id: 'gitlab', project_id: 'gitlabhq',
id: 'master/app/models/project.rb'))
newline_file = "new\n\nline.txt"
url_encoded_newline_file = ERB::Util.url_encode(newline_file)
- assert_routing({ path: "/gitlab/gitlabhq/-/edit/master/docs/#{url_encoded_newline_file}",
+ assert_routing({ path: "/gitlab/gitlabhq/edit/master/docs/#{url_encoded_newline_file}",
method: :get },
{ controller: 'projects/blob', action: 'edit',
namespace_id: 'gitlab', project_id: 'gitlabhq',
@@ -652,13 +634,13 @@ describe 'project routing' do
end
it 'to #preview' do
- expect(post('/gitlab/gitlabhq/-/preview/master/app/models/project.rb')).to(
+ expect(post('/gitlab/gitlabhq/preview/master/app/models/project.rb')).to(
route_to('projects/blob#preview',
namespace_id: 'gitlab', project_id: 'gitlabhq',
id: 'master/app/models/project.rb'))
newline_file = "new\n\nline.txt"
url_encoded_newline_file = ERB::Util.url_encode(newline_file)
- assert_routing({ path: "/gitlab/gitlabhq/-/edit/master/docs/#{url_encoded_newline_file}",
+ assert_routing({ path: "/gitlab/gitlabhq/edit/master/docs/#{url_encoded_newline_file}",
method: :get },
{ controller: 'projects/blob', action: 'edit',
namespace_id: 'gitlab', project_id: 'gitlabhq',
@@ -671,14 +653,12 @@ describe 'project routing' do
it 'to #show' do
newline_file = "new\n\nline.txt"
url_encoded_newline_file = ERB::Util.url_encode(newline_file)
- assert_routing({ path: "/gitlab/gitlabhq/-/raw/master/#{url_encoded_newline_file}",
+ assert_routing({ path: "/gitlab/gitlabhq/raw/master/#{url_encoded_newline_file}",
method: :get },
{ controller: 'projects/raw', action: 'show',
namespace_id: 'gitlab', project_id: 'gitlabhq',
id: "master/#{newline_file}" })
end
-
- it_behaves_like 'redirecting a legacy project path', "/gitlab/gitlabhq/raw/master/app/models/project.rb", "/gitlab/gitlabhq/-/raw/master/app/models/project.rb"
end
# project_compare_index GET /:project_id/compare(.:format) compare#index {id: /[^\/]+/, project_id: /[^\/]+/}
diff --git a/spec/serializers/blob_entity_spec.rb b/spec/serializers/blob_entity_spec.rb
index 3cd967ed44c..7e3a0a87bd5 100644
--- a/spec/serializers/blob_entity_spec.rb
+++ b/spec/serializers/blob_entity_spec.rb
@@ -23,7 +23,7 @@ describe BlobEntity do
mode: "100644",
readable_text: true,
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
diff --git a/spec/serializers/merge_request_poll_widget_entity_spec.rb b/spec/serializers/merge_request_poll_widget_entity_spec.rb
index 0593dd527cc..ea9052b4046 100644
--- a/spec/serializers/merge_request_poll_widget_entity_spec.rb
+++ b/spec/serializers/merge_request_poll_widget_entity_spec.rb
@@ -60,7 +60,7 @@ describe MergeRequestPollWidgetEntity do
project.add_developer(user)
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
diff --git a/spec/serializers/merge_request_widget_entity_spec.rb b/spec/serializers/merge_request_widget_entity_spec.rb
index 80f59ef90ca..22232682be1 100644
--- a/spec/serializers/merge_request_widget_entity_spec.rb
+++ b/spec/serializers/merge_request_widget_entity_spec.rb
@@ -45,12 +45,12 @@ describe MergeRequestWidgetEntity do
it 'has email_patches_path' do
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
it 'has plain_diff_path' do
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
describe 'when source project is deleted' do
diff --git a/spec/serializers/paginated_diff_entity_spec.rb b/spec/serializers/paginated_diff_entity_spec.rb
index 77569aaa4bc..7432e072318 100644
--- a/spec/serializers/paginated_diff_entity_spec.rb
+++ b/spec/serializers/paginated_diff_entity_spec.rb
@@ -26,7 +26,7 @@ describe PaginatedDiffEntity do
expect(subject[:pagination]).to eq(
current_page: 2,
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
)
end
diff --git a/spec/services/ci/expire_pipeline_cache_service_spec.rb b/spec/services/ci/expire_pipeline_cache_service_spec.rb
index f7fc73d9f9c..ff2d286465a 100644
--- a/spec/services/ci/expire_pipeline_cache_service_spec.rb
+++ b/spec/services/ci/expire_pipeline_cache_service_spec.rb
@@ -11,7 +11,7 @@ describe Ci::ExpirePipelineCacheService do
describe '#execute' do
it 'invalidates Etag caching for project pipelines path' do
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"
expect_any_instance_of(Gitlab::EtagCaching::Store).to receive(:touch).with(pipelines_path)
@@ -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
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_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)
expect_any_instance_of(Gitlab::EtagCaching::Store).to receive(:touch).with(merge_request_pipelines_path)
diff --git a/spec/services/merge_requests/get_urls_service_spec.rb b/spec/services/merge_requests/get_urls_service_spec.rb
index 8500aa2b852..dcb8c8080a1 100644
--- a/spec/services/merge_requests/get_urls_service_spec.rb
+++ b/spec/services/merge_requests/get_urls_service_spec.rb
@@ -8,8 +8,8 @@ describe MergeRequests::GetUrlsService do
let(:project) { create(:project, :public, :repository) }
let(:service) { described_class.new(project) }
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(:show_merge_request_url) { "http://#{Gitlab.config.gitlab.host}/#{project.full_path}/-/merge_requests/#{merge_request.iid}" }
+ 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(: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(:existing_branch_changes) { "d14d6c0abdd253381df51a723d58691b2ee1ab08 570e7b2abdd848b95f2f578043fc23bd6f6fd24d refs/heads/#{source_branch}" }
@@ -127,7 +127,7 @@ describe MergeRequests::GetUrlsService do
let(:new_branch_changes) { "#{Gitlab::Git::BLANK_SHA} 570e7b2abdd848b95f2f578043fc23bd6f6fd24d refs/heads/new_branch" }
let(:existing_branch_changes) { "d14d6c0abdd253381df51a723d58691b2ee1ab08 570e7b2abdd848b95f2f578043fc23bd6f6fd24d refs/heads/markdown" }
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
result = service.execute(changes)
diff --git a/spec/services/system_note_service_spec.rb b/spec/services/system_note_service_spec.rb
index 21bf4545f34..a952e26e338 100644
--- a/spec/services/system_note_service_spec.rb
+++ b/spec/services/system_note_service_spec.rb
@@ -328,7 +328,7 @@ describe SystemNoteService do
url = if type == 'commit'
"#{Settings.gitlab.base_url}/#{project.namespace.path}/#{project.path}/commit/#{commit.id}"
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
link = double(object: { 'url' => url })
diff --git a/spec/views/help/index.html.haml_spec.rb b/spec/views/help/index.html.haml_spec.rb
index 98040da9d2c..474a294ce0d 100644
--- a/spec/views/help/index.html.haml_spec.rb
+++ b/spec/views/help/index.html.haml_spec.rb
@@ -40,7 +40,7 @@ describe 'help/index' do
render
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