1
0
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:
2014-12-29 15:29:01 +01:00
parent bbe80b1409
commit fa86abc06d
5 changed files with 8 additions and 4 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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