mirror of
https://github.com/projekteuler/projekteuler.git
synced 2026-01-26 18:18:51 +01:00
Prefill translation form with old translation if possible
This commit is contained in:
@@ -23,11 +23,16 @@ class TranslationsControllerTest < ActionController::TestCase
|
||||
assert_not_nil assigns(:translations)
|
||||
end
|
||||
|
||||
test "should get new" do
|
||||
test "should get new for translated problem" do
|
||||
get :new, problem_id: 1
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get new for untranslated problem" do
|
||||
get :new, problem_id: 3
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should create translation" do
|
||||
assert_difference('Translation.count') do
|
||||
post :create, problem_id: 1, translation: @update
|
||||
|
||||
Reference in New Issue
Block a user