mirror of
https://github.com/projekteuler/projekteuler.git
synced 2026-01-26 18:18:51 +01:00
Fix #14: Make uniqueness check among other problems
This commit is contained in:
@@ -20,6 +20,15 @@ class TranslationTest < ActiveSupport::TestCase
|
||||
assert_not translation.save
|
||||
end
|
||||
|
||||
test "should save translation with duplicate title of translation for same problem" do
|
||||
translation = Translation.new(
|
||||
title: translations(:translation_one).title,
|
||||
content: 'This is some content',
|
||||
problem_id: 1
|
||||
)
|
||||
assert translation.save
|
||||
end
|
||||
|
||||
test "should save correct translation" do
|
||||
translation = Translation.new(
|
||||
title: 'A unique title',
|
||||
|
||||
Reference in New Issue
Block a user