Added specs for branches compare when from & to are empty

This commit is contained in:
Martin Cabrera 2017-01-10 23:46:32 +01:00
parent 5dc8fe31ba
commit 6972a35fec

View file

@ -64,6 +64,16 @@ describe Projects::CompareController do
expect(assigns(:diffs)).to eq(nil)
expect(assigns(:commits)).to eq(nil)
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
describe 'GET diff_for_path' do