Skip to content

Commit

Permalink
Linting spec tests
Browse files Browse the repository at this point in the history
  • Loading branch information
360dgries committed Oct 9, 2023
1 parent 8ac86f9 commit ac83e98
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 33 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -352,4 +352,4 @@ RUBY VERSION
ruby 3.1.2p20

BUNDLED WITH
2.3.23
2.3.23
32 changes: 0 additions & 32 deletions spec/inferno/dsl/fhir_client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,43 +135,11 @@ def test_session_id
end
end

describe '#primitive_parameter?' do
# it 'returns true when given a primitive parameter' do
# expect(group.primitive_parameter?(boolean_parameter)).to be true
# end

# it 'returns false when given a resource parameter' do
# expect(group.primitive_parameter?(resource_parameter)).to be false
# end

# it 'returns false when given a complex parameter' do
# expect(group.primitive_parameter?(ratio_parameter)).to be false
# end
end

describe '#body_to_path' do
# it 'converts primitives into a path query' do
# expect(group.body_to_path(body_with_two_primitives)).to eq({ PARAM_BOOL: true, PARAM_STRING: 'STRING' }.to_query)
# end

it 'handles repeated parameters' do
expected_body = [{ PARAM_BOOL: true }, { PARAM_BOOL: false }].map(&:to_query).join('&')
expect(group.body_to_path(body_with_repeated_parameters)).to eq(expected_body)
end

# it 'raises error if non-primitive parameter found' do
# body = body_with_nonprimitive
# expect do
# group.body_to_path(body)
# end.to raise_error(ArgumentError, 'Cannot use GET request with non-primitive datatype PARAM_RATIO')
# end

# it 'raises error if parameter is resource' do
# body = body_with_resource
# expect do
# group.body_to_path(body)
# end.to raise_error(ArgumentError, 'Cannot use GET request with non-primitive datatype PARAM_RESOURCE')
# end
end

describe '#fhir_operation' do
Expand Down

0 comments on commit ac83e98

Please sign in to comment.