Set default "Untitled" title for published cards

This commit is contained in:
Jorge Manrubia
2025-05-01 13:08:15 +02:00
parent bbda3eb913
commit ca1e002806
2 changed files with 15 additions and 4 deletions
+8
View File
@@ -120,4 +120,12 @@ class CardTest < ActiveSupport::TestCase
assert_includes card.cache_key, ApplicationRecord.current_tenant, "cache key must always include the tenant"
end
test "for published cards, it should set the default title 'Untitiled' when not provided" do
card = collections(:writebook).cards.create!
assert_nil card.title
card.publish
assert_equal "Untitled", card.reload.title
end
end