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

Switch to Bootstrap 4

This commit is contained in:
2019-12-23 17:49:54 +01:00
parent f28cade211
commit f08254ffef
26 changed files with 207 additions and 120 deletions

View File

@@ -7,6 +7,8 @@ class Admin::TranslationsControllerTest < ActionDispatch::IntegrationTest
login_admin
@translation = translations(:translation_one)
@translation_alternative = translations(:translation_two_alternative)
@translation_outdated = translations(:translation_two_outdated)
@translation_declined = translations(:translation_two_declined)
end
test "should get index" do
get admin_translations_url
@@ -14,11 +16,26 @@ class Admin::TranslationsControllerTest < ActionDispatch::IntegrationTest
assert_not_nil assigns(:translations)
end
test "should show translation" do
test "should show current_translation" do
get admin_translation_url(translation_id: @translation)
assert_response :success
end
test "should show alternative_translation" do
get admin_translation_url(translation_id: @translation_alternative)
assert_response :success
end
test "should show outdated_translation" do
get admin_translation_url(translation_id: @translation_outdated)
assert_response :success
end
test "should show declined_translation" do
get admin_translation_url(translation_id: @translation_declined)
assert_response :success
end
test "should accept translation" do
post admin_translation_accept_path(@translation_alternative)
assert_redirected_to problem_path(2)