Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'rails_helper'
- RSpec.describe V1::AppsController, type: :controller do
- let(:user) { create(:user) }
- describe '[mention] DELETE destroy when you are not logged in' do
- let(:app) { create(:app, account: user.account) }
- let(:make_request) { delete :destroy, id: app, format: :json }
- it 'does not delete the app (.count)' do
- app
- expect { make_request }.not_to change(App, :count)
- end
- end
- describe '[let] DELETE destroy when you are not logged in' do
- let(:app) { create(:app, account: user.account) }
- let(:make_request) { delete :destroy, id: app, format: :json }
- it 'does not delete the app (.count)' do
- expect { make_request }.not_to change(App, :count)
- end
- end
- describe '[let!] DELETE destroy when you are not logged in' do
- let!(:app) { create(:app, account: user.account) }
- let(:make_request) { delete :destroy, id: app, format: :json }
- it 'does not delete the app (.count)' do
- expect { make_request }.not_to change(App, :count)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement