[#45772] fixed eslint and failing spec

pull/11939/head
Eric Schubert 2 years ago
parent 96983b1bd5
commit 5a16ede712
No known key found for this signature in database
GPG Key ID: 1D346C019BD4BAA2
  1. 2
      frontend/src/app/core/file-upload/op-file-upload.service.ts
  2. 2
      modules/storages/spec/requests/api/v3/storages/storage_files_spec.rb

@ -82,7 +82,7 @@ export class OpenProjectFileUploadService {
const mapped = finished
.then((result:HalResource[]) => result.map((el:HalResource) => ({
response: el,
uploadUrl: el.staticDownloadLocation.href,
uploadUrl: (el.staticDownloadLocation as unknown&{ href:string }).href,
}))) as Promise<{ response:HalResource, uploadUrl:string }[]>;
return { uploads, finished: mapped } as MappedUploadResult;

@ -207,7 +207,7 @@ describe 'API v3 storage files', content_type: :json, webmock: true do
end
it { is_expected.to be_json_eql(upload_link.destination.to_json).at_path('_links/destination/href') }
it { is_expected.to be_json_eql("put".to_json).at_path('_links/destination/method') }
it { is_expected.to be_json_eql("post".to_json).at_path('_links/destination/method') }
it { is_expected.to be_json_eql("Upload File".to_json).at_path('_links/destination/title') }
end

Loading…
Cancel
Save