1
0
mirror of https://github.com/projekteuler/projekteuler.git synced 2026-01-27 02:28:50 +01:00

Update rails and code

This commit is contained in:
2017-11-23 13:52:13 +01:00
parent 8334baff99
commit 95bb01b440
30 changed files with 340 additions and 152 deletions

View File

@@ -15,18 +15,18 @@ class TranslationsControllerTest < ActionController::TestCase
end
test "should get new for translated problem" do
get :new, problem_id: 1
get :new, params: { problem_id: 1 }
assert_response :success
end
test "should get new for untranslated problem" do
get :new, problem_id: 3
get :new, params: { problem_id: 3 }
assert_response :success
end
test "should create translation" do
assert_difference('Translation.count') do
post :create, problem_id: 1, translation: @update
post :create, params: { problem_id: 1, translation: @update }
end
assert_redirected_to problem_path(id: 1)
@@ -34,7 +34,7 @@ class TranslationsControllerTest < ActionController::TestCase
test "should not create incorrect translation" do
assert_no_difference('Translation.count') do
post :create, problem_id: 1, translation: @incorrect
post :create, params: { problem_id: 1, translation: @incorrect }
end
end
end