Sha256: 0a6d799648de4b14a18f6f99cef55902675ef2497442e4f1b59f59693d881e3c

Contents?: true

Size: 382 Bytes

Versions: 8

Compression:

Stored size: 382 Bytes

Contents

describe Spree::RoleSerializer do
  let(:role) { create :role }
  subject { ActiveModel::Serializer::Adapter::JsonApi.new(described_class.new role) }

  its(:to_json) do
    is_expected.to be_json_eql <<-JSON
      {
        "data" : {
          "attributes" : {
            "name" : "#{role.name}"
          },
          "type" : "spree_roles"
        }
      }
    JSON
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
solidus_json_api-0.3.1 spec/serializers/spree/role_serializer_spec.rb
solidus_json_api-0.3.0 spec/serializers/spree/role_serializer_spec.rb
spree_api_v2-0.2.2 spec/serializers/spree/role_serializer_spec.rb
solidus_api_v2-0.2.2 spec/serializers/spree/role_serializer_spec.rb
solidus_api_v2-0.2.1 spec/serializers/spree/role_serializer_spec.rb
spree_api_v2-0.2.1 spec/serializers/spree/role_serializer_spec.rb
spree_api_v2-0.2.0 spec/serializers/spree/role_serializer_spec.rb
solidus_api_v2-0.2.0 spec/serializers/spree/role_serializer_spec.rb