Sha256: 13ffb2f4ab5e89bd3b03b3c85240704304823042d0a5278cc29a8c2ede9e5fc9

Contents?: true

Size: 384 Bytes

Versions: 8

Compression:

Stored size: 384 Bytes

Contents

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

  its(:to_json) do
    is_expected.to be_json_eql <<-JSON
      {
        "data" : {
          "attributes" : {
            "email" : "#{user.email}"
          },
          "type" : "spree_users"
        }
      }
    JSON
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

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