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
redirect_to project_blob_path(@project, File.join(@ref, file_path))
else
flash[:alert] = result[:message]
render :show
render :new
end
end
......@@ -53,7 +53,7 @@ class Projects::BlobController < Projects::ApplicationController
redirect_to after_edit_path
else
flash[:alert] = result[:message]
render :show
render :edit
end
end
......
......@@ -284,11 +284,11 @@ module SharedPaths
end
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
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')))
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