require 'rails_helper'

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

    it 'updates the resource' do
      expect {
        delete "/<%= api_namespace %>/v1/<%= type %>/#{<%= file_name %>.id}"
      }.to change { <%= model_klass %>.count }.by(-1)

      expect(response.status).to eq(204)
    end
  end
end

require 'rails_helper'

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

    it 'updates the resource' do
      expect {
        delete "/<%= api_namespace %>/v1/<%= type %>/#{<%= file_name %>.id}"
      }.to change { <%= model_klass %>.count }.by(-1)

      expect(response.status).to eq(204)
    end
  end
end

Remove explicit FactoryGirl/Bot from destroy spec gen
Remove explicit FactoryGirl/Bot from destroy spec gen

We are including the method helpers so we can just use `#create`
directly.
