Skip to content

Commit

Permalink
Fixes broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
HazelGrant committed May 14, 2024
1 parent 054f9b1 commit 9f7151b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apps/dashboard/app/apps/ood_files_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def candidate_favorite_paths
# returns an array of other paths provided as shortcuts to the user
def favorite_paths
@favorite_paths ||= candidate_favorite_paths.select do |p|
Configuration.allowlist_paths.include?(p.path) && (p.remote? || p.path.directory?) && p.path.readable? && p.path.executable?
AllowlistPolicy.default.permitted?(p.path) && (p.remote? || p.path.directory?) && p.path.readable? && p.path.executable?
end
end
end
15 changes: 7 additions & 8 deletions apps/dashboard/test/integration/dashboard_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def teardown
FavoritePath.new(scratch_path, title: 'Scratch'),
FavoritePath.new(project_path),
FavoritePath.new(project_path2),
FavoritePath.new(s3_path, title: 'S3', filesystem: 'Scratch')
FavoritePath.new(s3_path, title: 'S3', filesystem: 's3')
]

OodFilesApp.stubs(:candidate_favorite_paths).returns(favorites)
Expand All @@ -45,8 +45,7 @@ def teardown
`mkdir -p #{scratch_path}`
`mkdir -p #{project_path}`
`mkdir -p #{project_path2}`
# regular directory now though?
#`mkdir -p #{s3_path}`
`mkdir -p #{s3_path}`

get root_path
dditems = dropdown_list_items(dropdown_list('Files'))
Expand All @@ -64,11 +63,11 @@ def teardown

dditemurls = dropdown_list_items_urls(dropdown_list('Files'))
assert_equal [
"#{dir}/#{Dir.home}",
"#{scratch_path}",
"#{dir}/#{project_path}",
"#{dir}/#{project_path2}",
"#{dir}/s3/mybucket"
"/pun/sys/files/fs#{Dir.home}",
"/pun/sys/files/fs#{scratch_path}",
"/pun/sys/files/fs#{project_path}",
"/pun/sys/files/fs#{project_path2}",
"/pun/sys/files/s3#{s3_path}"
], dditemurls, 'Files dropdown URLs are incorrect'
end
end
Expand Down

0 comments on commit 9f7151b

Please sign in to comment.