Commit 1574a921 authored by Rémy Coutable's avatar Rémy Coutable

Resolve conflicts

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 8486c8e5
......@@ -28,15 +28,9 @@ module RoutableActions
return unless request.get?
canonical_path = routable.full_path
<<<<<<< HEAD
if canonical_path != requested_path
if canonical_path.casecmp(requested_path) != 0
flash[:notice] = "#{routable.class.to_s.titleize} '#{requested_path}' was moved to '#{canonical_path}'. Please update any links and bookmarks that may still have the old path."
=======
if canonical_path != requested_full_path
if canonical_path.casecmp(requested_full_path) != 0
flash[:notice] = "#{routable.class.to_s.titleize} '#{requested_full_path}' was moved to '#{canonical_path}'. Please update any links and bookmarks that may still have the old path."
>>>>>>> origin/master
end
redirect_to build_canonical_path(routable)
end
......
......@@ -84,7 +84,6 @@ describe GroupsController do
expect(assigns(:issues)).to eq [issue_2, issue_1]
end
end
<<<<<<< HEAD
context 'when requesting the canonical path with different casing' do
it 'redirects to the correct casing' do
......@@ -105,8 +104,6 @@ describe GroupsController do
expect(controller).to set_flash[:notice].to(group_moved_message(redirect_route, group))
end
end
=======
>>>>>>> origin/master
end
describe 'GET #merge_requests' do
......@@ -132,7 +129,6 @@ describe GroupsController do
expect(assigns(:merge_requests)).to eq [merge_request_2, merge_request_1]
end
end
<<<<<<< HEAD
context 'when requesting the canonical path with different casing' do
it 'redirects to the correct casing' do
......@@ -153,8 +149,6 @@ describe GroupsController do
expect(controller).to set_flash[:notice].to(group_moved_message(redirect_route, group))
end
end
=======
>>>>>>> origin/master
end
describe 'DELETE #destroy' do
......@@ -252,8 +246,6 @@ describe GroupsController do
end
end
<<<<<<< HEAD
=======
describe '#ensure_canonical_path' do
before do
sign_in(user)
......@@ -447,7 +439,6 @@ describe GroupsController do
end
end
>>>>>>> origin/master
def group_moved_message(redirect_route, group)
"Group '#{redirect_route.path}' was moved to '#{group.full_path}'. Please update any links and bookmarks that may still have the old path."
end
......
......@@ -219,7 +219,6 @@ describe ProjectsController do
expect(response).to redirect_to(namespace_project_path)
end
end
<<<<<<< HEAD
context 'when requesting a redirected path' do
let!(:redirect_route) { public_project.redirect_routes.create!(path: "foo/bar") }
......@@ -231,8 +230,6 @@ describe ProjectsController do
expect(controller).to set_flash[:notice].to(project_moved_message(redirect_route, public_project))
end
end
=======
>>>>>>> origin/master
end
describe "#update" do
......@@ -415,7 +412,6 @@ describe ProjectsController do
expect(parsed_body["Tags"]).to include("v1.0.0")
expect(parsed_body["Commits"]).to include("123456")
end
<<<<<<< HEAD
context 'when requesting a redirected path' do
let!(:redirect_route) { public_project.redirect_routes.create!(path: "foo/bar") }
......@@ -427,8 +423,6 @@ describe ProjectsController do
expect(controller).to set_flash[:notice].to(project_moved_message(redirect_route, public_project))
end
end
=======
>>>>>>> origin/master
end
describe 'GET edit' do
......@@ -463,8 +457,6 @@ describe ProjectsController do
end
end
<<<<<<< HEAD
=======
describe '#ensure_canonical_path' do
before do
sign_in(user)
......@@ -568,7 +560,6 @@ describe ProjectsController do
end
end
>>>>>>> origin/master
def project_moved_message(redirect_route, project)
"Project '#{redirect_route.path}' was moved to '#{project.full_path}'. Please update any links and bookmarks that may still have the old path."
end
......
......@@ -53,7 +53,6 @@ describe UsersController do
end
end
<<<<<<< HEAD
context 'when requesting the canonical path' do
let(:user) { create(:user, username: 'CamelCaseUser') }
......@@ -88,8 +87,6 @@ describe UsersController do
end
end
=======
>>>>>>> origin/master
context 'when a user by that username does not exist' do
context 'when logged out' do
it 'redirects to login page' do
......@@ -134,7 +131,6 @@ describe UsersController do
expect(assigns(:contributions_calendar).projects.count).to eq(2)
end
end
<<<<<<< HEAD
context 'when requesting the canonical path' do
let(:user) { create(:user, username: 'CamelCaseUser') }
......@@ -169,8 +165,6 @@ describe UsersController do
expect(controller).to set_flash[:notice].to(user_moved_message(redirect_route, user))
end
end
=======
>>>>>>> origin/master
end
describe 'GET #calendar_activities' do
......@@ -193,7 +187,6 @@ describe UsersController do
get :calendar_activities, username: user.username
expect(response).to render_template('calendar_activities')
end
<<<<<<< HEAD
context 'when requesting the canonical path' do
let(:user) { create(:user, username: 'CamelCaseUser') }
......@@ -226,8 +219,6 @@ describe UsersController do
expect(controller).to set_flash[:notice].to(user_moved_message(redirect_route, user))
end
end
=======
>>>>>>> origin/master
end
describe 'GET #snippets' do
......@@ -250,7 +241,6 @@ describe UsersController do
expect(JSON.parse(response.body)).to have_key('html')
end
end
<<<<<<< HEAD
context 'when requesting the canonical path' do
let(:user) { create(:user, username: 'CamelCaseUser') }
......@@ -283,8 +273,6 @@ describe UsersController do
expect(controller).to set_flash[:notice].to(user_moved_message(redirect_route, user))
end
end
=======
>>>>>>> origin/master
end
describe 'GET #exists' do
......@@ -333,8 +321,6 @@ describe UsersController do
end
end
<<<<<<< HEAD
=======
describe '#ensure_canonical_path' do
before do
sign_in(user)
......@@ -456,7 +442,6 @@ describe UsersController do
end
end
>>>>>>> origin/master
def user_moved_message(redirect_route, user)
"User '#{redirect_route.path}' was moved to '#{user.full_path}'. Please update any links and bookmarks that may still have the old path."
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