spec/praxis/response_definition_spec.rb in praxis-0.18.0 vs spec/praxis/response_definition_spec.rb in praxis-0.18.1

- old
+ new

@@ -520,11 +520,11 @@ its([:name]) { should eq 'Instance' } context 'examples' do subject(:examples) { payload[:examples] } its(['json', :content_type]) { 'application/vnd.acme.instance+json '} its(['xml', :content_type]) { 'application/vnd.acme.instance+xml' } - + it 'properly encodes the example bodies' do json = Praxis::Application.instance.handlers['json'].parse(examples['json'][:body]) xml = Praxis::Application.instance.handlers['xml'].parse(examples['xml'][:body]) expect(json).to eq xml end @@ -554,11 +554,11 @@ it 'should contain a parts_like key with a hash' do expect( output ).to have_key(:parts_like) end it{ should be_kind_of(::Hash) } - its([:payload]){ should == { identifier: 'foobar'} } + its([:payload]){ should == {id: 'Praxis-SimpleMediaType', name: 'Praxis::SimpleMediaType', family: 'string', identifier: 'foobar' } } its([:status]){ should == 200 } end context 'using a full response definition block' do let(:parts) do Proc.new do @@ -570,10 +570,10 @@ it 'should contain a parts_like key with a hash' do expect( output ).to have_key(:parts_like) end it{ should be_kind_of(::Hash) } - its([:payload]) { should == { identifier: 'custom_media'} } + its([:payload]) { should == {id: 'Praxis-SimpleMediaType', name: 'Praxis::SimpleMediaType', family: 'string', identifier: 'custom_media'} } its([:status]) { should == 234 } end end end end