Skip to content

Commit a8ee0d5

Browse files
committed
Updated tests to reflect changes in controllers
1 parent d242fdc commit a8ee0d5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

test/functional/lists_controller_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class ListsControllerTest < ActionController::TestCase
149149

150150
test "should not get practice not logged in" do
151151
get :practice, :id => @list.to_param, :format => :json
152-
assert_response(401)
152+
assert_response(403)
153153
end
154154

155155
test "should not get practice not authorized" do

test/functional/questions_controller_test.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -375,25 +375,25 @@ def with_lock
375375
end
376376

377377
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)
380380
end
381381

382382
test "should not evaluate answer not authorized" do
383383
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
385385
assert_response(403)
386386
end
387387

388388
test "should not evaluate answer wrong question" do
389389
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
391391
assert_response(403)
392392
end
393393

394394
test "should evaluate answer" do
395395
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
397397
assert_response :success
398398
end
399399
end

0 commit comments

Comments
 (0)