You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
457 B

  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. describe ActivityPub::OneTimeKeySerializer do
  4. let(:serialization) do
  5. JSON.parse(
  6. ActiveModelSerializers::SerializableResource.new(
  7. record, serializer: described_class
  8. ).to_json
  9. )
  10. end
  11. let(:record) { Fabricate(:one_time_key) }
  12. describe 'type' do
  13. it 'returns correct serialized type' do
  14. expect(serialization['type']).to eq('Curve25519Key')
  15. end
  16. end
  17. end