2017-12-06 06:36:11 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Groups::UploadsController do
|
2018-06-12 11:54:37 -04:00
|
|
|
include WorkhorseHelpers
|
|
|
|
|
2017-12-06 06:36:11 -05:00
|
|
|
let(:model) { create(:group, :public) }
|
|
|
|
let(:params) do
|
|
|
|
{ group_id: model }
|
|
|
|
end
|
|
|
|
|
2018-01-29 12:57:34 -05:00
|
|
|
it_behaves_like 'handle uploads' do
|
|
|
|
let(:uploader_class) { NamespaceFileUploader }
|
|
|
|
end
|
2018-06-12 11:54:37 -04:00
|
|
|
|
|
|
|
def post_authorize(verified: true)
|
|
|
|
request.headers.merge!(workhorse_internal_api_request_header) if verified
|
|
|
|
|
|
|
|
post :authorize, group_id: model.full_path, format: :json
|
|
|
|
end
|
2017-12-06 06:36:11 -05:00
|
|
|
end
|