1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
7 class CollectionsHelperTest < ActionView::TestCase
8 reset_api_fixtures :after_each_test, false
11 ["filename.csv", true],
12 ["filename.fa", true],
13 ["filename.fasta", true],
14 ["filename.seq", true], # another fasta extension
15 ["filename.go", true],
16 ["filename.htm", true],
17 ["filename.html", true],
18 ["filename.json", true],
19 ["filename.md", true],
20 ["filename.pdf", true],
21 ["filename.py", true],
23 ["filename.sam", true],
24 ["filename.sh", true],
25 ["filename.txt", true],
26 ["filename.tiff", true],
27 ["filename.tsv", true],
28 ["filename.vcf", true],
29 ["filename.xml", true],
30 ["filename.xsl", true],
31 ["filename.yml", true],
32 ["filename.yaml", true],
33 ["filename.bed", true],
34 ["filename.cwl", true],
36 ["filename.bam", false],
37 ["filename.tar", false],
39 ].each do |file_name, preview_allowed|
40 test "verify '#{file_name}' is allowed for preview #{preview_allowed}" do
41 assert_equal preview_allowed, preview_allowed_for(file_name)