3 class CollectionsHelperTest < ActionView::TestCase
4 reset_api_fixtures :after_each_test, false
7 ["filename.csv", true],
9 ["filename.fasta", true],
10 ["filename.seq", true], # another fasta extension
11 ["filename.go", true],
12 ["filename.htm", true],
13 ["filename.html", true],
14 ["filename.json", true],
15 ["filename.md", true],
16 ["filename.pdf", true],
17 ["filename.py", true],
19 ["filename.sam", true],
20 ["filename.sh", true],
21 ["filename.txt", true],
22 ["filename.tiff", true],
23 ["filename.tsv", true],
24 ["filename.vcf", true],
25 ["filename.xml", true],
26 ["filename.xsl", true],
27 ["filename.yml", true],
29 ["filename.bam", false],
30 ["filename.tar", false],
32 ].each do |file_name, preview_allowed|
33 test "verify '#{file_name}' is allowed for preview #{preview_allowed}" do
34 assert_equal preview_allowed, preview_allowed_for(file_name)