gitlab-org--gitlab-foss/spec/controllers/projects/uploads_controller_spec.rb

19 lines
529 B
Ruby
Raw Normal View History

2017-12-06 06:36:11 -05:00
require 'spec_helper'
2015-02-16 13:58:40 -05:00
describe Projects::UploadsController do
2017-12-06 06:36:11 -05:00
let(:model) { create(:project, :public) }
let(:params) do
{ namespace_id: model.namespace.to_param, project_id: model }
2015-02-16 13:58:40 -05:00
end
2015-04-17 05:33:58 -04:00
2017-12-06 06:36:11 -05:00
it_behaves_like 'handle uploads'
context 'when the URL the old style, without /-/system' do
it 'responds with a redirect to the login page' do
get :show, namespace_id: 'project', project_id: 'avatar', filename: 'foo.png', secret: 'bar'
expect(response).to redirect_to(new_user_session_path)
end
end
2015-02-16 13:58:40 -05:00
end