Rebuild rubocop TODOs after auto-correcting

This commit is contained in:
James Mason 2018-04-04 10:18:51 -07:00
parent 31c50255e9
commit 84dbb52d11
No known key found for this signature in database
GPG key ID: 1B3951886C449023
580 changed files with 3689 additions and 3133 deletions

View file

@ -1,7 +1,8 @@
# frozen_string_literal: true
require 'spec_helper'
describe BoothsController do
let(:user) { create(:user) }
let(:conference) { create(:conference) }
let(:booth) { create(:booth, title: 'Title', conference: conference) }
@ -13,7 +14,7 @@ describe BoothsController do
end
describe 'GET index' do
before { get :index, conference_id: conference.short_title }
before { get :index, params: { conference_id: conference.short_title } }
it 'assigns attributes for booths' do
expect(assigns(:booths)).to eq([booth])
@ -25,7 +26,7 @@ describe BoothsController do
end
describe 'GET #new' do
before { get :new, conference_id: conference.short_title }
before { get :new, params: { conference_id: conference.short_title } }
it 'assigns attributes for booths' do
expect(assigns(:booth)).to be_a_new(Booth)
@ -38,7 +39,7 @@ describe BoothsController do
describe 'POST #create' do
context 'successfully created' do
before { post :create, booth: attributes_for(:booth), conference_id: conference.short_title }
before { post :create, params: { booth: attributes_for(:booth), conference_id: conference.short_title } }
it 'creates a new booth' do
expect(Booth.count).to_not eq(0)
@ -58,11 +59,11 @@ describe BoothsController do
end
context 'create action fails' do
before { post :create, booth: attributes_for(:booth, title: ''), conference_id: conference.short_title }
before { post :create, params: { booth: attributes_for(:booth, title: ''), conference_id: conference.short_title } }
it 'does not create any record' do
expected = expect do
post :create, booth: attributes_for(:booth, title: ''), conference_id: conference.short_title
post :create, params: { booth: attributes_for(:booth, title: ''), conference_id: conference.short_title }
end
expected.to_not change(Booth, :count)
end
@ -78,7 +79,7 @@ describe BoothsController do
end
describe 'GET #edit' do
before { get :edit, id: booth.id, conference_id: conference.short_title }
before { get :edit, params: { id: booth.id, conference_id: conference.short_title } }
it 'renders edit template' do
expect(response).to render_template('edit')
@ -91,7 +92,7 @@ describe BoothsController do
describe 'PATCH #update' do
context 'updates suchessfully' do
before { patch :update, id: booth.id, booth: attributes_for(:booth, title: 'different'), conference_id: conference.short_title }
before { patch :update, params: { id: booth.id, booth: attributes_for(:booth, title: 'different'), conference_id: conference.short_title } }
it 'redirects to booth index path' do
expect(response).to redirect_to conference_booths_path