1
0
mirror of https://github.com/projekteuler/projekteuler.git synced 2026-01-26 18:18:51 +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)

View File

@@ -18,6 +18,19 @@ translation_two_alternative:
content: The changed content for the second problem
status: 0
translation_two_outdated:
problem_id: 2
title: Second title
content: The old content for the second problem
status: 2
translation_two_declined:
problem_id: 2
title: Second title
content: The content for the second problem with typo
status: 3
translation_with_html:
problem_id: 4
title: Some title