3 class CollectionsHelperTest < ActionView::TestCase
4 test "file_path generates short names" do
5 assert_equal('foo', CollectionsHelper.file_path(['.', 'foo', 0]),
6 "wrong result for filename in collection root")
7 assert_equal('foo/bar', CollectionsHelper.file_path(['foo', 'bar', 0]),
8 "wrong result for filename in directory without leading .")
9 assert_equal('foo/bar', CollectionsHelper.file_path(['./foo', 'bar', 0]),
10 "wrong result for filename in directory with leading .")