mirror of
https://github.com/projekteuler/projekteuler.git
synced 2026-01-26 18:18:51 +01:00
Add presence of problem to translation
This commit is contained in:
@@ -5,7 +5,8 @@ class TranslationsControllerTest < ActionController::TestCase
|
||||
@translation = translations(:one)
|
||||
@update = {
|
||||
title: 'New title',
|
||||
content: 'This is the new content'
|
||||
content: 'This is the new content',
|
||||
problem_id: Problem.first
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
2
test/fixtures/translations.yml
vendored
2
test/fixtures/translations.yml
vendored
@@ -1,9 +1,11 @@
|
||||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
one:
|
||||
problem: one
|
||||
title: First title
|
||||
content: The content of the translation
|
||||
|
||||
two:
|
||||
problem: two
|
||||
title: Second title
|
||||
content: The content of the second translation
|
||||
|
||||
@@ -22,7 +22,8 @@ class TranslationTest < ActiveSupport::TestCase
|
||||
test "should save correct translation" do
|
||||
translation = Translation.new(
|
||||
title: 'A unique title',
|
||||
content: 'Some content'
|
||||
content: 'Some content',
|
||||
problem: Problem.first
|
||||
)
|
||||
assert translation.save
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user