summaryrefslogtreecommitdiff
path: root/test/models
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-21 22:29:13 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-21 22:29:13 +0200
commit18114a978b7c037da5194c48f860435e261f9a0b (patch)
tree57d4fc0bbdff72c420c0597fc26efff25a188cc0 /test/models
parent9c951f3a0f379b0f459988106cf3f839acdadbe2 (diff)
PDFs currently should have no credits attached to them in display
Diffstat (limited to 'test/models')
-rw-r--r--test/models/asset_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/models/asset_test.rb b/test/models/asset_test.rb
index cda0a04..ab1cc5d 100644
--- a/test/models/asset_test.rb
+++ b/test/models/asset_test.rb
@@ -46,4 +46,11 @@ class AssetTest < ActiveSupport::TestCase
46 assert Asset.new(:upload_content_type => "application/pdf").pdf? 46 assert Asset.new(:upload_content_type => "application/pdf").pdf?
47 assert_not Asset.new(:upload_content_type => "image/png").pdf? 47 assert_not Asset.new(:upload_content_type => "image/png").pdf?
48 end 48 end
49
50 test "show_credit? is false for a PDF even with every credit field present" do
51 asset = Asset.new(:name => "demo", :upload_content_type => "application/pdf",
52 :creator => "Jane Doe", :source_url => "https://example.org", :license_key => "cc_by_4")
53 assert asset.has_credit?
54 assert_not asset.show_credit?
55 end
49end 56end