Fix 2.4.2 upgrade notes formatting refs #19330
[arvados.git] / apps / workbench / test / unit / helpers / collections_helper_test.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 require 'test_helper'
6
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 .")
15   end
16 end