Fix #14: Make uniqueness check among other problems

This commit is contained in:
pfischbeck committed 2015-02-12 16:31:52 +01:00
1 parent 0e9a1ce617
commit c124808ffe
2 files changed
+19 -1

No files matched your search

+9
View File
@@ -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',