Sha256: eae8450ecff227012ca13eb90b9654c7d90b09c49df876db42f95d3f32d60064
Contents?: true
Size: 507 Bytes
Versions: 33
Compression:
Stored size: 507 Bytes
Contents
require 'rails_helper' RSpec.describe "<%= type %>#destroy", type: :request do subject(:make_request) do jsonapi_delete "/<%= api_namespace %>/v1/<%= type %>/#{<%= file_name %>.id}" end describe 'basic destroy' do let!(:<%= file_name %>) { create(:<%= file_name %>) } it 'updates the resource' do expect { make_request }.to change { <%= model_klass %>.count }.by(-1) expect(response.status).to eq(200) expect(json).to eq('meta' => {}) end end end
Version data entries
33 entries across 33 versions & 1 rubygems