Sha256: 4fdc965631a6ed83343f37ad2567bbdbccf6036f73b0005d441ab9ceae673d9b
Contents?: true
Size: 1.23 KB
Versions: 1
Compression:
Stored size: 1.23 KB
Contents
require_relative '../spec_helper' describe '=> /domain-types' do before(:all) do RestfulObjects::DomainModel.current.reset class DomainObject include RestfulObjects::Object end end describe 'GET /domain-types' do it 'generates response with a domain types in value arrray' do get '/domain-types' last_response.body.should match_json_expression( { value: [ { rel: 'urn:org.restfulobjects:rels/domain-type', href: "http://localhost/domain-types/DomainObject", type: 'application/json;profile="urn:org.restfulobjects:repr-types/domain-type"', method: 'GET' } ] }) end it 'generates response links to homepage & sellf' do get '/domain-types' last_response.body.should match_json_expression( { links: [ { rel: 'self', href: 'http://localhost/domain-types', type: 'application/json;profile="urn:org.restfulobjects:repr-types/type-list"', method: 'GET' }, { rel: 'up', href: 'http://localhost/', type: 'application/json;profile="urn:org.restfulobjects:repr-types/homepage"', method: 'GET' } ] }) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
restful_objects-0.0.8 | spec/integration/domain-types_spec.rb |