fix failing spec on quiz
fixed: - since we're not explicitly checking for errors in quiz_submission#save, throw an exception if an error happens. - fix error formatting assertion Change-Id: I1ac2134a965d329e733c8f54ed2786e06adff91e Reviewed-on: https://gerrit.instructure.com/29703 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Cody Cutrer <cody@instructure.com> Product-Review: Derek DeVries <ddevries@instructure.com> QA-Review: Derek DeVries <ddevries@instructure.com>
This commit is contained in:
parent
a3cf4748cc
commit
c87397517a
|
@ -309,7 +309,7 @@ class Quizzes::Quiz < ActiveRecord::Base
|
|||
# If the quiz suddenly changes from non-graded to graded,
|
||||
# then this will update the existing submissions to reflect quiz
|
||||
# scores in the gradebook.
|
||||
self.quiz_submissions.each { |s| s.save }
|
||||
self.quiz_submissions.each { |s| s.save! }
|
||||
end
|
||||
|
||||
attr_accessor :saved_by
|
||||
|
|
|
@ -972,7 +972,7 @@ describe Quizzes::Quiz do
|
|||
it "should not allow quiz points higher than allowable by postgres" do
|
||||
q = Quizzes::Quiz.new(:points_possible => 2000000001)
|
||||
q.valid?.should == false
|
||||
q.errors.on(:points_possible).should == "must be less than or equal to 2000000000"
|
||||
Array(q.errors[:points_possible]).should == ["must be less than or equal to 2000000000"]
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue