Commit ed913786 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix blob controller rendering in case of errors

parent 752cb506
...@@ -28,7 +28,7 @@ class Projects::BlobController < Projects::ApplicationController ...@@ -28,7 +28,7 @@ class Projects::BlobController < Projects::ApplicationController
redirect_to project_blob_path(@project, File.join(@ref, file_path)) redirect_to project_blob_path(@project, File.join(@ref, file_path))
else else
flash[:alert] = result[:message] flash[:alert] = result[:message]
render :show render :new
end end
end end
...@@ -53,7 +53,7 @@ class Projects::BlobController < Projects::ApplicationController ...@@ -53,7 +53,7 @@ class Projects::BlobController < Projects::ApplicationController
redirect_to after_edit_path redirect_to after_edit_path
else else
flash[:alert] = result[:message] flash[:alert] = result[:message]
render :show render :edit
end end
end end
......
...@@ -284,11 +284,11 @@ module SharedPaths ...@@ -284,11 +284,11 @@ module SharedPaths
end end
step 'I am on the new file page' do step 'I am on the new file page' do
current_path.should eq(project_new_tree_path(@project, root_ref)) current_path.should eq(project_create_blob_path(@project, root_ref))
end end
step 'I am on the ".gitignore" edit file page' do step 'I am on the ".gitignore" edit file page' do
current_path.should eq(project_edit_tree_path( current_path.should eq(project_edit_blob_path(
@project, File.join(root_ref, '.gitignore'))) @project, File.join(root_ref, '.gitignore')))
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment