Sha256: 7f5b44a6634623391b0e0c473bd8af83bdca1209d875996c75efa9d5ad82464d
Contents?: true
Size: 510 Bytes
Versions: 1
Compression:
Stored size: 510 Bytes
Contents
# frozen_string_literal: true describe Grape::Roar do include_context 'Grape API App' context 'using present' do before do subject.get('/product/:id') do present Product.new(title: 'Lonestar', id: params[:id]), with: ProductRepresenter end end it 'returns a hypermedia representation' do get '/product/666' expect(last_response.body).to eq '{"title":"Lonestar","id":"666","links":[{"rel":"self","href":"http://example.org/product/666"}]}' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
grape-roar-0.4.1 | spec/present_with_spec.rb |