diff --git a/apps/dashboard/test/controllers/concerns/directory_utils_concern_test.rb b/apps/dashboard/test/controllers/concerns/directory_utils_concern_test.rb index d18fe8656..3e16dc729 100644 --- a/apps/dashboard/test/controllers/concerns/directory_utils_concern_test.rb +++ b/apps/dashboard/test/controllers/concerns/directory_utils_concern_test.rb @@ -307,4 +307,16 @@ def setup ], sorted_files end + # Tests for DirectoryUtilsConcern#posix_file? + test 'posix_file? returns true when @path is a PosixFile' do + path = PosixFile.new('/some/path') + @controller.instance_variable_set(:@path, path) + assert @controller.posix_file? + end + + test 'posix_file? returns false when @path is a RemoteFile' do + path = RemoteFile.new('/some/path', 'remote_fs') + @controller.instance_variable_set(:@path, path) + refute @controller.posix_file? + end end \ No newline at end of file