Fix fediverse:creator
metadata not showing up in REST API (#33466)
This commit is contained in:
parent
08dd11f8d4
commit
dbbf450ef5
2 changed files with 19 additions and 2 deletions
|
@ -21,7 +21,24 @@ RSpec.describe REST::PreviewCardSerializer do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when preview card has author data' do
|
||||
context 'when preview card has fediverse author data' do
|
||||
let(:preview_card) { Fabricate.build :preview_card, author_account: Fabricate(:account) }
|
||||
|
||||
it 'includes populated authors array' do
|
||||
expect(subject.deep_symbolize_keys)
|
||||
.to include(
|
||||
authors: be_an(Array).and(
|
||||
contain_exactly(
|
||||
include(
|
||||
account: be_present
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when preview card has non-fediverse author data' do
|
||||
let(:preview_card) { Fabricate.build :preview_card, author_name: 'Name', author_url: 'https://host.example/123' }
|
||||
|
||||
it 'includes populated authors array' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue