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

[#40196] fixed representer spec

Eric Schubert385ebe19028b
diff --git a/docs/api/apiv3/paths/file_link.yml b/docs/api/apiv3/paths/file_link.yml
index c33cb4cfffc..6275a32ef80 100644
--- a/docs/api/apiv3/paths/file_link.yml
+++ b/docs/api/apiv3/paths/file_link.yml
@@ -39,7 +39,7 @@ get:
delete:
summary: Removes a file link.
- operationId: Work_Package_Delete_File_Link
+ operationId: Delete_File_Link
tags:
- Work Packages
- File links
diff --git a/docs/api/apiv3/paths/work_package_file_links.yml b/docs/api/apiv3/paths/work_package_file_links.yml
index 06958b5d475..132250a3ff9 100644
--- a/docs/api/apiv3/paths/work_package_file_links.yml
+++ b/docs/api/apiv3/paths/work_package_file_links.yml
@@ -112,7 +112,7 @@ post:
get:
summary: Gets all file links of a work package
- operationId: Work_Package_Get_File_Links
+ operationId: Work_Package_Get_File_Link_Collection
tags:
- Work Packages
- File links
diff --git a/lib/api/v3/notifications/notification_representer.rb b/lib/api/v3/notifications/notification_representer.rb
index f7eb4a23472..0d5a869f1b7 100644
--- a/lib/api/v3/notifications/notification_representer.rb
+++ b/lib/api/v3/notifications/notification_representer.rb
@@ -34,6 +34,8 @@ module API
include API::Decorators::LinkedResource
extend API::Decorators::PolymorphicResource
+ self_link title_getter: ->(*) { nil }
+
property :id
property :read_ian,
diff --git a/spec/lib/api/v3/notifications/notification_representer_rendering_spec.rb b/spec/lib/api/v3/notifications/notification_representer_rendering_spec.rb
index 95c39165b6e..5d2768edb66 100644
--- a/spec/lib/api/v3/notifications/notification_representer_rendering_spec.rb
+++ b/spec/lib/api/v3/notifications/notification_representer_rendering_spec.rb
@@ -58,10 +58,9 @@ describe ::API::V3::Notifications::NotificationRepresenter, 'rendering' do
let(:read_ian) { false }
describe 'self link' do
- it_behaves_like 'has a titled link' do
+ it_behaves_like 'has an untitled link' do
let(:link) { 'self' }
let(:href) { api_v3_paths.notification notification.id }
- let(:title) { notification.subject }
end
end
@@ -102,10 +101,6 @@ describe ::API::V3::Notifications::NotificationRepresenter, 'rendering' do
let(:value) { notification.id }
end
- it_behaves_like 'property', :subject do
- let(:value) { notification.subject }
- end
-
it_behaves_like 'property', :reason do
let(:value) { notification.reason }
end