Sha256: 6e0e71de31a172e42abf822c079f4a3c31f10205b7a0eeca05b80733c99e30b9

Contents?: true

Size: 382 Bytes

Versions: 20

Compression:

Stored size: 382 Bytes

Contents

require 'rails_helper'

RSpec.describe "<%= file_name.pluralize %>#show", type: :request do
  context 'basic fetch' do
    let!(:<%= file_name %>) { create(:<%= file_name %>) }

    it 'serializes the resource correctly' do
      get "/api/v1/<%= file_name.pluralize %>/#{<%= file_name %>.id}"

      assert_payload(:<%= file_name %>, <%= file_name %>, json_item)
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
jsonapi_compliable-0.10.3 lib/generators/jsonapi/templates/show_request_spec.rb.erb
jsonapi_compliable-0.10.2 lib/generators/jsonapi/templates/show_request_spec.rb.erb
jsonapi_compliable-0.10.1 lib/generators/jsonapi/templates/show_request_spec.rb.erb
jsonapi_compliable-0.10.0 lib/generators/jsonapi/templates/show_request_spec.rb.erb
jsonapi_compliable-0.9.2 lib/generators/jsonapi/templates/show_request_spec.rb.erb
jsonapi_compliable-0.9.1 lib/generators/jsonapi/templates/show_request_spec.rb.erb
jsonapi_compliable-0.9.0 lib/generators/jsonapi/templates/show_request_spec.rb.erb
jsonapi_compliable-0.8.0 lib/generators/jsonapi/templates/show_request_spec.rb.erb
jsonapi_compliable-0.7.9 lib/generators/jsonapi/templates/show_request_spec.rb.erb
jsonapi_compliable-0.7.8 lib/generators/jsonapi/templates/show_request_spec.rb.erb
jsonapi_compliable-0.7.7 lib/generators/jsonapi/templates/show_request_spec.rb.erb
jsonapi_compliable-0.7.6 lib/generators/jsonapi/templates/show_request_spec.rb.erb
jsonapi_compliable-0.7.5 lib/generators/jsonapi/templates/show_request_spec.rb.erb
jsonapi_compliable-0.7.4 lib/generators/jsonapi/templates/show_request_spec.rb.erb
jsonapi_compliable-0.7.3 lib/generators/jsonapi/templates/show_request_spec.rb.erb
jsonapi_compliable-0.7.2 lib/generators/jsonapi/templates/show_request_spec.rb.erb
jsonapi_compliable-0.6.13 lib/generators/jsonapi/templates/show_request_spec.rb.erb
jsonapi_compliable-0.6.12 lib/generators/jsonapi/templates/show_request_spec.rb.erb
jsonapi_compliable-0.6.11 lib/generators/jsonapi/templates/show_request_spec.rb.erb
jsonapi_compliable-0.6.10 lib/generators/jsonapi/templates/show_request_spec.rb.erb