spec: fix quiz validation specs for ruby 1.8
Change-Id: I7a5e87e9327d77924a74c50e88373afe3ad210e7 Reviewed-on: https://gerrit.instructure.com/17726 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Jake Sorce <jake@instructure.com> QA-Review: Jake Sorce <jake@instructure.com>
This commit is contained in:
parent
f6b74d7b86
commit
9814b3a40b
spec/models
|
@ -1055,7 +1055,7 @@ describe Quiz do
|
|||
quiz = @course.quizzes.create! :title => "test quiz"
|
||||
quiz.quiz_type = "totally_invalid_quiz_type"
|
||||
quiz.save.should be_false
|
||||
quiz.errors.any?{|e| e =~ /quiz_type/}.should be_true
|
||||
quiz.errors["invalid_quiz_type"].should be_present
|
||||
end
|
||||
|
||||
it "should not validate quiz_type if not changed" do
|
||||
|
@ -1073,7 +1073,7 @@ describe Quiz do
|
|||
quiz = @course.quizzes.create! :title => "test quiz"
|
||||
quiz.ip_filter = "999.999.1942.489"
|
||||
quiz.save.should be_false
|
||||
quiz.errors.any?{|e| e =~ /ip_filter/}.should be_true
|
||||
quiz.errors["invalid_ip_filter"].should be_present
|
||||
end
|
||||
|
||||
it "should not validate ip_filter if not changed" do
|
||||
|
@ -1091,7 +1091,7 @@ describe Quiz do
|
|||
quiz = @course.quizzes.create! :title => "test quiz"
|
||||
quiz.hide_results = "totally_invalid_value"
|
||||
quiz.save.should be_false
|
||||
quiz.errors.any?{|e| e =~ /hide_results/}.should be_true
|
||||
quiz.errors["invalid_hide_results"].should be_present
|
||||
end
|
||||
|
||||
it "should not validate hide_results if not changed" do
|
||||
|
|
Loading…
Reference in New Issue