Merge remote-tracking branch 'parent/main' into kb_development
This commit is contained in:
commit
3ccf0d02c6
39 changed files with 828 additions and 728 deletions
|
@ -9,7 +9,7 @@ describe ActivityPub::NoteSerializer do
|
|||
let(:searchability) { :public }
|
||||
let!(:account) { Fabricate(:account) }
|
||||
let!(:other) { Fabricate(:account) }
|
||||
let!(:parent) { Fabricate(:status, account: account, visibility: visibility, searchability: searchability) }
|
||||
let!(:parent) { Fabricate(:status, account: account, visibility: visibility, searchability: searchability, language: 'zh-TW') }
|
||||
let!(:reply_by_account_first) { Fabricate(:status, account: account, thread: parent, visibility: :public) }
|
||||
let!(:reply_by_account_next) { Fabricate(:status, account: account, thread: parent, visibility: :public) }
|
||||
let!(:reply_by_other_first) { Fabricate(:status, account: other, thread: parent, visibility: :public) }
|
||||
|
@ -24,8 +24,15 @@ describe ActivityPub::NoteSerializer do
|
|||
@serialization = ActiveModelSerializers::SerializableResource.new(parent, serializer: described_class, adapter: ActivityPub::Adapter)
|
||||
end
|
||||
|
||||
it 'has a Note type' do
|
||||
expect(subject['type']).to eql('Note')
|
||||
it 'has the expected shape' do
|
||||
expect(subject).to include({
|
||||
'@context' => include('https://www.w3.org/ns/activitystreams'),
|
||||
'type' => 'Note',
|
||||
'attributedTo' => ActivityPub::TagManager.instance.uri_for(account),
|
||||
'contentMap' => include({
|
||||
'zh-TW' => a_kind_of(String),
|
||||
}),
|
||||
})
|
||||
end
|
||||
|
||||
it 'has a replies collection' do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue