mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-09 07:28:41 -07:00
Autoformat code with rubocop
This commit is contained in:
parent
68dde8a6ef
commit
ed7a3b8a3d
43 changed files with 112 additions and 114 deletions
|
|
@ -16,38 +16,38 @@ module Legacy
|
|||
end
|
||||
|
||||
let(:schedule) do
|
||||
Schedule.create(name: 'Test Schedule', question_list: question_list, recipient_list: recipient_list)
|
||||
Schedule.create(name: 'Test Schedule', question_list:, recipient_list:)
|
||||
end
|
||||
let(:school) { Legacy::School.create!(name: 'School') }
|
||||
|
||||
let(:recipient_schedule) do
|
||||
RecipientSchedule.create(recipient: recipients.first, schedule: schedule, next_attempt_at: Time.now)
|
||||
RecipientSchedule.create(recipient: recipients.first, schedule:, next_attempt_at: Time.now)
|
||||
end
|
||||
let(:recipient_schedule2) do
|
||||
RecipientSchedule.create(recipient: recipients.last, schedule: schedule, next_attempt_at: Time.now)
|
||||
RecipientSchedule.create(recipient: recipients.last, schedule:, next_attempt_at: Time.now)
|
||||
end
|
||||
|
||||
let!(:first_attempt) do
|
||||
Attempt.create(
|
||||
schedule: schedule,
|
||||
schedule:,
|
||||
recipient: recipients.first,
|
||||
recipient_schedule: recipient_schedule,
|
||||
recipient_schedule:,
|
||||
question: questions.first,
|
||||
sent_at: Time.new
|
||||
)
|
||||
end
|
||||
let!(:attempt) do
|
||||
Attempt.create(
|
||||
schedule: schedule,
|
||||
schedule:,
|
||||
recipient: recipients.first,
|
||||
recipient_schedule: recipient_schedule,
|
||||
recipient_schedule:,
|
||||
question: questions.first,
|
||||
sent_at: Time.new
|
||||
)
|
||||
end
|
||||
let!(:attempt2) do
|
||||
Attempt.create(
|
||||
schedule: schedule,
|
||||
schedule:,
|
||||
recipient: recipients.last,
|
||||
recipient_schedule: recipient_schedule2,
|
||||
question: questions.first,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ module Legacy
|
|||
let(:valid_session) { {} }
|
||||
|
||||
before :each do
|
||||
user.user_schools.create(school: school)
|
||||
user.user_schools.create(school:)
|
||||
sign_in user
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ module Legacy
|
|||
let(:valid_session) { {} }
|
||||
|
||||
before :each do
|
||||
user.user_schools.create(school: school)
|
||||
user.user_schools.create(school:)
|
||||
sign_in user
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ module Legacy
|
|||
let(:valid_session) { {} }
|
||||
|
||||
before :each do
|
||||
user.user_schools.create(school: school)
|
||||
user.user_schools.create(school:)
|
||||
sign_in user
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -21,15 +21,15 @@ require 'rails_helper'
|
|||
module Legacy
|
||||
RSpec.describe SchoolsController, type: :controller do
|
||||
let(:district) { District.create! name: 'District' }
|
||||
let!(:school) { School.create! name: 'school', district: district }
|
||||
let!(:school) { School.create! name: 'school', district: }
|
||||
let!(:user) { User.create(email: 'test@example.com', password: '123456') }
|
||||
let!(:user_school) { user.user_schools.create(school: school) }
|
||||
let!(:user_school) { user.user_schools.create(school:) }
|
||||
|
||||
# This should return the minimal set of attributes required to create a valid
|
||||
# School. As you add validations to School, be sure to
|
||||
# adjust the attributes here as well.
|
||||
let(:valid_attributes) do
|
||||
{ name: 'School', district: district }
|
||||
{ name: 'School', district: }
|
||||
end
|
||||
|
||||
let(:invalid_attributes) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue