Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FI-3027: Granular Scopes Test Failure to Skip #566

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def granular_scope_regex(resource_type)
"No resource-level scope was requested for #{resource_type}"

granular_scope = requested_scopes.find { |scope| scope.match(granular_scope_regex(resource_type)) }
assert granular_scope.nil?, "Granular scope was requested: #{granular_scope}"
skip_if granular_scope.present?, "Granular scope was requested: #{granular_scope}"
end

assert received_scopes.present?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ def run(runnable, inputs = {})
expect(result.result_message).to match(/No resource-level scope was requested/)
end

it 'fails if a granular scope is requested' do
it 'skips if a granular scope is requested' do
scopes_with_granular = "#{requested_scopes} patient/Observation.rs?category=" \
'http://terminology.hl7.org/CodeSystem/observation-category|survey'

result = run(test, requested_scopes: scopes_with_granular, received_scopes:)

expect(result.result).to eq('fail')
expect(result.result).to eq('skip')
expect(result.result_message).to match(/Granular scope was requested/)
end

Expand Down
Loading