[#40196] fixed representer spec

pull/10468/head
Eric Schubert 3 years ago
parent 40e3f49b8f
commit 385ebe1902
No known key found for this signature in database
GPG Key ID: 1D346C019BD4BAA2
  1. 2
      docs/api/apiv3/paths/file_link.yml
  2. 2
      docs/api/apiv3/paths/work_package_file_links.yml
  3. 2
      lib/api/v3/notifications/notification_representer.rb
  4. 7
      spec/lib/api/v3/notifications/notification_representer_rendering_spec.rb

@ -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

@ -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

@ -34,6 +34,8 @@ module API
include API::Decorators::LinkedResource
extend API::Decorators::PolymorphicResource
self_link title_getter: ->(*) { nil }
property :id
property :read_ian,

@ -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

Loading…
Cancel
Save