debian-mirror-gitlab/spec/controllers/groups/uploads_controller_spec.rb

21 lines
476 B
Ruby
Raw Normal View History

2018-03-17 18:26:18 +05:30
require 'spec_helper'
describe Groups::UploadsController do
2018-11-08 19:23:39 +05:30
include WorkhorseHelpers
2018-03-17 18:26:18 +05:30
let(:model) { create(:group, :public) }
let(:params) do
{ group_id: model }
end
it_behaves_like 'handle uploads' do
let(:uploader_class) { NamespaceFileUploader }
end
2018-11-08 19:23:39 +05:30
def post_authorize(verified: true)
request.headers.merge!(workhorse_internal_api_request_header) if verified
2019-02-15 15:39:39 +05:30
post :authorize, params: { group_id: model.full_path }, format: :json
2018-11-08 19:23:39 +05:30
end
2018-03-17 18:26:18 +05:30
end