Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

fix tests: file_link api endpoint is not nested in work_packages anymore

Christophe Bliardf2b8dcb003c2
diff --git a/modules/storages/spec/lib/api/v3/file_links/file_link_representer_rendering_spec.rb b/modules/storages/spec/lib/api/v3/file_links/file_link_representer_rendering_spec.rb
index 3540403c10b..eb7df90e175 100644
--- a/modules/storages/spec/lib/api/v3/file_links/file_link_representer_rendering_spec.rb
+++ b/modules/storages/spec/lib/api/v3/file_links/file_link_representer_rendering_spec.rb
@@ -48,7 +48,7 @@ describe ::API::V3::FileLinks::FileLinkRepresenter, 'rendering' do
describe 'self' do
it_behaves_like 'has an untitled link' do
let(:link) { 'self' }
- let(:href) { "/api/v3/work_packages/#{container.id}/file_links/#{file_link.id}" }
+ let(:href) { "/api/v3/file_links/#{file_link.id}" }
end
end
@@ -81,7 +81,7 @@ describe ::API::V3::FileLinks::FileLinkRepresenter, 'rendering' do
it_behaves_like 'has an untitled action link' do
let(:link) { 'delete' }
- let(:href) { "/api/v3/work_packages/#{container.id}/file_links/#{file_link.id}" }
+ let(:href) { "/api/v3/file_links/#{file_link.id}" }
let(:method) { :delete }
end
end
@@ -96,7 +96,7 @@ describe ::API::V3::FileLinks::FileLinkRepresenter, 'rendering' do
describe 'staticOriginOpen' do
it_behaves_like 'has an untitled link' do
let(:link) { 'staticOriginOpen' }
- let(:href) { "/api/v3/work_packages/#{container.id}/file_links/#{file_link.id}/open" }
+ let(:href) { "/api/v3/file_links/#{file_link.id}/open" }
end
end
end