1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
7 class CollectionsHelperTest < ActionView::TestCase
8 test "file_path generates short names" do
9 assert_equal('foo', CollectionsHelper.file_path(['.', 'foo', 0]),
10 "wrong result for filename in collection root")
11 assert_equal('foo/bar', CollectionsHelper.file_path(['foo', 'bar', 0]),
12 "wrong result for filename in directory without leading .")
13 assert_equal('foo/bar', CollectionsHelper.file_path(['./foo', 'bar', 0]),
14 "wrong result for filename in directory with leading .")