Skip to content

Commit

Permalink
More tests
Browse files Browse the repository at this point in the history
  • Loading branch information
euler-room committed Dec 5, 2024
1 parent 9b5c0bd commit ad5a854
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ad5a854

Please sign in to comment.