Rubocop autocorrections

This commit is contained in:
James Mason 2018-11-13 18:01:49 -08:00
parent 299738f58d
commit 43bef689fc
85 changed files with 622 additions and 578 deletions

View file

@ -50,12 +50,12 @@ describe Admin::RegistrationPeriodsController do
conference.email_settings = create(:email_settings)
conference.registration_period = create(:registration_period,
start_date: Date.today,
end_date: Date.today + 2.days)
end_date: Date.today + 2.days)
patch :update, conference_id: conference.short_title, registration_period:
attributes_for(:registration_period,
start_date: Date.today + 2.days,
end_date: Date.today + 4.days)
end_date: Date.today + 4.days)
conference.reload
allow(Mailbot).to receive(:conference_registration_date_update_mail).and_return(mailer)
end
@ -67,7 +67,7 @@ describe Admin::RegistrationPeriodsController do
it 'saves the registration period to the database' do
expected = expect do
post :create,
conference_id: conference.short_title,
conference_id: conference.short_title,
registration_period: attributes_for(:registration_period)
end
expected.to change { RegistrationPeriod.count }.by 1
@ -75,7 +75,7 @@ describe Admin::RegistrationPeriodsController do
it 'redirects to registration_periods#show' do
post :create,
conference_id: conference.short_title,
conference_id: conference.short_title,
registration_period: attributes_for(:registration_period)
expect(response).to redirect_to admin_conference_registration_period_path(
@ -87,20 +87,20 @@ describe Admin::RegistrationPeriodsController do
it 'does not save the registration period to the database' do
expected = expect do
post :create,
conference_id: conference.short_title,
conference_id: conference.short_title,
registration_period: attributes_for(:registration_period,
start_date: nil,
end_date: nil)
end_date: nil)
end
expected.to_not change { Conference.count }
end
it 're-renders the new template' do
post :create,
conference_id: conference.short_title,
conference_id: conference.short_title,
registration_period: attributes_for(:registration_period,
start_date: nil,
end_date: nil)
end_date: nil)
expect(response).to be_success
end
end