aboutsummaryrefslogtreecommitdiff
path: root/test/models/thing_test.rb
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <msabate@suse.com>2024-03-18 22:20:23 +0100
committerMiquel Sabaté Solà <msabate@suse.com>2024-03-18 22:57:57 +0100
commit6c5f73b241d3b31123fbbc61cc4acf76adae8d5e (patch)
tree213291754e5a591c0c78f1eef06bdd7f66ff2c79 /test/models/thing_test.rb
parentcb9113ceff41ed374e4ecce2583b4f9e3ff506dc (diff)
downloadoperum-6c5f73b241d3b31123fbbc61cc4acf76adae8d5e.tar.gz
operum-6c5f73b241d3b31123fbbc61cc4acf76adae8d5e.zip
thing: removed unique index on title
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to 'test/models/thing_test.rb')
-rw-r--r--test/models/thing_test.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/test/models/thing_test.rb b/test/models/thing_test.rb
index 766a5e2..ef2a1e2 100644
--- a/test/models/thing_test.rb
+++ b/test/models/thing_test.rb
@@ -60,18 +60,12 @@ class ThingTest < ActiveSupport::TestCase
thing.save!
end
- test 'title and target must be unique' do
+ test 'target must be unique' do
thing = things(:thing1).dup
- thing.title = 'another'
assert_raise(ActiveRecord::RecordInvalid) { thing.save! }
thing.target = 'also another'
- thing.title = things(:thing1).title
- assert_raise(ActiveRecord::RecordInvalid) { thing.save! }
-
- thing.target = 'also another'
- thing.title = 'now for real'
assert_difference('Thing.count') { thing.save! }
end