Commit 6972a35f authored by Martin Cabrera's avatar Martin Cabrera

Added specs for branches compare when from & to are empty

parent 5dc8fe31
...@@ -64,6 +64,16 @@ describe Projects::CompareController do ...@@ -64,6 +64,16 @@ describe Projects::CompareController do
expect(assigns(:diffs)).to eq(nil) expect(assigns(:diffs)).to eq(nil)
expect(assigns(:commits)).to eq(nil) expect(assigns(:commits)).to eq(nil)
end end
it 'redirects back to index when params[:from] & params[:to] are empty' do
post(:create,
namespace_id: project.namespace.to_param,
project_id: project.to_param,
from: '',
to: '')
expect(response).to redirect_to(namespace_project_compare_index_path)
end
end end
describe 'GET diff_for_path' do describe 'GET diff_for_path' do
......
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