Skip to content

Commit

Permalink
fix file param and test (#1093)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmilljr24 authored Oct 28, 2024
1 parent f511080 commit eeeb173
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ def index
def create
authorize! :external_form_upload,
context: {organization: Current.organization}
file = params.require(:files).first
file = params[:files]

# Only processes single file upload
import_service = Organizations::Importers::GoogleCsvImportService.new(file)
import_service.call
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Staff
class ExternalFormUploadControllerTest < ActionDispatch::IntegrationTest
setup do
file = fixture_file_upload("google_form_sample.csv", "text/csv")
@params = {files: [file]}
@params = {files: file}
admin = create(:admin)
@adopter = create(:adopter, email: "[email protected]")
@adopter2 = create(:adopter, email: "[email protected]")
Expand Down

0 comments on commit eeeb173

Please sign in to comment.