Sha256: 7fb22af05339ab9335e31322a2037974ef5a4952600b8d80e33cf095a41ba71a
Contents?: true
Size: 585 Bytes
Versions: 20
Compression:
Stored size: 585 Bytes
Contents
require 'rails_helper' RSpec.describe "<%= file_name.pluralize %>#index", type: :request do context 'basic fetch' do let!(:<%= file_name %>1) { create(:<%= file_name %>) } let!(:<%= file_name %>2) { create(:<%= file_name %>) } it 'serializes the list correctly' do get "/api/v1/<%= file_name.pluralize %>" expect(json_ids(true)).to match_array([<%= file_name %>1.id, <%= file_name %>2.id]) assert_payload(:<%= file_name %>, <%= file_name %>1, json_items[0]) assert_payload(:<%= file_name %>, <%= file_name %>2, json_items[1]) end end end
Version data entries
20 entries across 20 versions & 1 rubygems