@@ -375,25 +375,25 @@ def with_lock
375
375
end
376
376
377
377
test "should not evaluate answer not logged in" do
378
- get :evaluate , :id => @question . id , :answer_choice_id => @question . answer_choices . first . id , :format => :json
379
- assert_response ( 401 )
378
+ get :evaluate , :id => @question . to_param , :answer_choice_id => @question . answer_choices . first . id , :format => :json
379
+ assert_response ( 403 )
380
380
end
381
381
382
382
test "should not evaluate answer not authorized" do
383
383
user_login
384
- get :evaluate , :id => @question . id , :answer_choice_id => @question . answer_choices . first . id , :format => :json
384
+ get :evaluate , :id => @question . to_param , :answer_choice_id => @question . answer_choices . first . id , :format => :json
385
385
assert_response ( 403 )
386
386
end
387
387
388
388
test "should not evaluate answer wrong question" do
389
389
sign_in @user
390
- get :evaluate , :id => @question2 . id , :answer_choice_id => @question . answer_choices . first . id , :format => :json
390
+ get :evaluate , :id => @question2 . to_param , :answer_choice_id => @question . answer_choices . first . id , :format => :json
391
391
assert_response ( 403 )
392
392
end
393
393
394
394
test "should evaluate answer" do
395
395
sign_in @user
396
- get :evaluate , :id => @question . id , :answer_choice_id => @question . answer_choices . first . id , :format => :json
396
+ get :evaluate , :id => @question . to_param , :answer_choice_id => @question . answer_choices . first . id , :format => :json
397
397
assert_response :success
398
398
end
399
399
end
0 commit comments