Merge remote-tracking branch 'parent/main' into upstream-20240926

This commit is contained in:
KMY 2024-09-26 08:29:41 +09:00
commit c905714459
517 changed files with 4284 additions and 3891 deletions

View file

@ -1,14 +0,0 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe ActivityPub::DeviceSerializer do
let(:serialization) { serialized_record_json(record, described_class) }
let(:record) { Fabricate(:device) }
describe 'type' do
it 'returns correct serialized type' do
expect(serialization['type']).to eq('Device')
end
end
end

View file

@ -1,14 +0,0 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe ActivityPub::OneTimeKeySerializer do
let(:serialization) { serialized_record_json(record, described_class) }
let(:record) { Fabricate(:one_time_key) }
describe 'type' do
it 'returns correct serialized type' do
expect(serialization['type']).to eq('Curve25519Key')
end
end
end

View file

@ -1,14 +0,0 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe REST::EncryptedMessageSerializer do
let(:serialization) { serialized_record_json(record, described_class) }
let(:record) { Fabricate(:encrypted_message) }
describe 'account' do
it 'returns the associated account' do
expect(serialization['account_id']).to eq(record.from_account.id.to_s)
end
end
end

View file

@ -1,14 +0,0 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe REST::Keys::ClaimResultSerializer do
let(:serialization) { serialized_record_json(record, described_class) }
let(:record) { Keys::ClaimService::Result.new(Account.new(id: 123), 456) }
describe 'account' do
it 'returns the associated account' do
expect(serialization['account_id']).to eq('123')
end
end
end

View file

@ -1,14 +0,0 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe REST::Keys::DeviceSerializer do
let(:serialization) { serialized_record_json(record, described_class) }
let(:record) { Device.new(name: 'Device name') }
describe 'name' do
it 'returns the name' do
expect(serialization['name']).to eq('Device name')
end
end
end

View file

@ -1,14 +0,0 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe REST::Keys::QueryResultSerializer do
let(:serialization) { serialized_record_json(record, described_class) }
let(:record) { Keys::QueryService::Result.new(Account.new(id: 123), []) }
describe 'account' do
it 'returns the associated account id' do
expect(serialization['account_id']).to eq('123')
end
end
end