Change survey data loader spec to use factorybot objects instead of loading seeds. Change databasecleaner to use transaction. Add back babel-preset dependency to fix failing javascript test in production.

This commit is contained in:
rebuilt 2023-03-23 15:06:17 -07:00
parent 1d30ff5977
commit c15cb7b483
11 changed files with 1068 additions and 137 deletions

View file

@ -22,11 +22,11 @@ RSpec.describe AdminDataValue, type: :model do
expect do
AdminDataValue.create!(likert_score: 0, school:, admin_data_item:,
academic_year:)
end.to raise_error
end.to raise_error 'Validation failed: Likert score must be greater than 0'
expect do
AdminDataValue.create!(likert_score: 5.00001, school:, admin_data_item:,
academic_year:)
end.to raise_error
end.to raise_error 'Validation failed: Likert score must be less than or equal to 5'
expect(AdminDataValue.count).to eq(0)
end
end