Add: _misskey_licenseの送受信 (#968)

This commit is contained in:
KMY(雪あすか) 2025-01-23 18:50:38 +09:00 committed by GitHub
parent 9c14810881
commit c139f8947e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 110 additions and 3 deletions

View file

@ -0,0 +1,33 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe ActivityPub::EmojiSerializer do
describe '.serializer_for' do
subject { serialized_record_json(model, described_class, adapter: ActivityPub::Adapter) }
let(:model) { Fabricate(:custom_emoji) }
context 'without license' do
it 'does not have information' do
expect(subject).to_not include({
'_misskey_license' => { 'freeText' => 'Ohagi' },
})
expect(subject).to_not include({
'license' => 'Ohagi',
})
end
end
context 'with license' do
let(:model) { Fabricate(:custom_emoji, license: 'Ohagi') }
it 'has information' do
expect(subject).to include({
'license' => 'Ohagi',
'_misskey_license' => { 'freeText' => 'Ohagi' },
})
end
end
end
end