From 2fdfdc0a6c8fe550f225cbc16e1582406050cd83 Mon Sep 17 00:00:00 2001 From: Radhika Chippada Date: Fri, 20 Mar 2015 23:14:43 -0400 Subject: [PATCH] 5375: and add the new test file --- .../test/helpers/collections_helper_test.rb | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 apps/workbench/test/helpers/collections_helper_test.rb diff --git a/apps/workbench/test/helpers/collections_helper_test.rb b/apps/workbench/test/helpers/collections_helper_test.rb new file mode 100644 index 0000000000..e7accad423 --- /dev/null +++ b/apps/workbench/test/helpers/collections_helper_test.rb @@ -0,0 +1,34 @@ +require 'test_helper' + +class CollectionsHelperTest < ActionView::TestCase + [ + ["filename.csv", true], + ["filename.fa", true], + ["filename.fasta", true], + ["filename.seq", true], # another fasta extension + ["filename.go", true], + ["filename.htm", true], + ["filename.html", true], + ["filename.json", true], + ["filename.md", true], + ["filename.pdf", true], + ["filename.py", true], + ["filename.R", true], + ["filename.sam", true], + ["filename.sh", true], + ["filename.txt", true], + ["filename.tiff", true], + ["filename.tsv", true], + ["filename.vcf", true], + ["filename.xml", true], + ["filename.xsl", true], + ["filename.yml", true], + + ["filename.bam", false], + ["filename", false], + ].each do |file_name, preview_allowed| + test "verify '#{file_name}' is allowed for preview #{preview_allowed}" do + assert_equal preview_allowed, preview_allowed_for(file_name) + end + end +end -- 2.30.2