Sha256: 445072202ef0a78a2469afa0e9172ad8551d67faa3c59252f49e6942243d055b
Contents?: true
Size: 593 Bytes
Versions: 8
Compression:
Stored size: 593 Bytes
Contents
describe Spree::StateSerializer do let(:state) { create :state } subject { ActiveModel::Serializer::Adapter::JsonApi.new(described_class.new state) } its(:to_json) do is_expected.to be_json_eql <<-JSON { "data" : { "attributes" : { "abbr" : "#{state.abbr}", "name" : "#{state.name}" }, "relationships" : { "country" : { "data" : { "type" : "spree_countries" } } }, "type" : "spree_states" } } JSON end end
Version data entries
8 entries across 8 versions & 3 rubygems