Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

Commit

Permalink
Skip some tests in SprinklerSearchTest.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-a-o committed Nov 30, 2020
1 parent 9d93ffa commit 2e19fd0
Showing 1 changed file with 43 additions and 15 deletions.
58 changes: 43 additions & 15 deletions lib/tests/suites/sprinkler_search_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ def teardown
links "#{BASE_SPEC_LINK}/patient.html#search"
validates resource: "Patient", methods: ["search"]
}
skip 'Could not find a patient to search on in setup.' unless @read_entire_feed

assert @read_entire_feed, 'Could not find a patient to search on in setup.'

search_string = ''
if fhir_version == :dstu2
search_string = @patient.name[0].family.first[0..2]
Expand Down Expand Up @@ -196,7 +198,9 @@ def teardown
links "#{BASE_SPEC_LINK}/patient.html#search"
validates resource: "Patient", methods: ["search"]
}
skip 'Could not find a patient to search on in setup.' unless @read_entire_feed

assert @read_entire_feed, 'Could not find a patient to search on in setup.'

search_string = @patient.name[0].given[0]
search_regex = Regexp.new(search_string, Regexp::IGNORECASE)
# how many patients in the bundle have matching names?
Expand Down Expand Up @@ -240,7 +244,9 @@ def teardown
links "#{BASE_SPEC_LINK}/condition.html#search"
validates resource: "Condition", methods: ["search"]
}
skip 'Could not find a patient to search on in setup.' unless @read_entire_feed

assert @read_entire_feed, 'Could not find a patient to search on in setup.'

# pick some search parameters... we previously created
# next, we're going execute a series of searches for conditions referencing the patient
options = {
Expand Down Expand Up @@ -271,7 +277,9 @@ def teardown
links "#{BASE_SPEC_LINK}/condition.html#search"
validates resource: "Condition", methods: ["search"]
}
skip 'Could not find a patient to search on in setup.' unless @read_entire_feed

assert @read_entire_feed, 'Could not find a patient to search on in setup.'

# pick some search parameters... we previously created
options = {
:id => @entries[0].resource.id,
Expand Down Expand Up @@ -311,7 +319,9 @@ def teardown
links "#{BASE_SPEC_LINK}/condition.html#search"
validates resource: "Condition", methods: ["search"]
}
skip 'Could not find a patient to search on in setup.' unless @read_entire_feed

assert @read_entire_feed, 'Could not find a patient to search on in setup.'

# pick some search parameters... we previously created
patient_id = @entries[0].resource.id

Expand Down Expand Up @@ -344,7 +354,9 @@ def teardown
links "#{BASE_SPEC_LINK}/condition.html#search"
validates resource: "Condition", methods: ["search"]
}
skip 'Could not find a patient to search on in setup.' unless @read_entire_feed

assert @read_entire_feed, 'Could not find a patient to search on in setup.'

# pick some search parameters... we previously created
options = {
:id => @entries[0].resource.id,
Expand Down Expand Up @@ -385,7 +397,9 @@ def teardown
links "#{BASE_SPEC_LINK}/condition.html#search"
validates resource: "Condition", methods: ["search"]
}
skip 'Could not find a patient to search on in setup.' unless @read_entire_feed

assert @read_entire_feed, 'Could not find a patient to search on in setup.'

# pick some search parameters... we previously created
patient = @entries[0].resource
patient_id = @entries[0].resource.id
Expand Down Expand Up @@ -419,7 +433,7 @@ def teardown
links "#{BASE_SPEC_LINK}/condition.html#search"
validates resource: "Condition", methods: ["search"]
}
skip 'Could not find a patient to search on in setup.' unless @read_entire_feed
assert @read_entire_feed, 'Could not find a patient to search on in setup.'
# pick some search parameters... we previously created
patient_id = @entries[0].resource.id

Expand Down Expand Up @@ -452,7 +466,7 @@ def teardown
links "#{BASE_SPEC_LINK}/condition.html#search"
validates resource: "Condition", methods: ["search"]
}
skip 'Could not find a patient to search on in setup.' unless @read_entire_feed
assert @read_entire_feed, 'Could not find a patient to search on in setup.'
# pick some search parameters... we previously created
patient_name = @patient.name[0].family

Expand Down Expand Up @@ -485,7 +499,7 @@ def teardown
links "#{BASE_SPEC_LINK}/condition.html#search"
validates resource: "Condition", methods: ["search"]
}
skip 'Could not create a patient in setup.' unless @patient_id
assert @patient_id, 'Could not create a patient in setup.'
# pick some search parameters... we previously created
patient_identifier = @patient.identifier[0].value

Expand Down Expand Up @@ -518,7 +532,7 @@ def teardown
links "#{BASE_SPEC_LINK}/condition.html#search"
validates resource: "Condition", methods: ["search"]
}
skip 'Could not create Condition in setup.' unless @condition_id
assert @condition_id, 'Could not create Condition in setup.'

# next, we're going execute a series of searches for conditions referencing the patient
options = {
Expand Down Expand Up @@ -549,7 +563,10 @@ def teardown
links "#{BASE_SPEC_LINK}/patient.html#search"
validates resource: "Patient", methods: ["search"]
}
skip 'Could not create a patient in setup.' unless @patient_id

skip 'TODO: https://github.com/FirelyTeam/spark/issues/307'

assert @patient_id, 'Could not create a patient in setup.'

# next, we're going execute a series of searches for conditions referencing the patient
options = {
Expand Down Expand Up @@ -580,7 +597,10 @@ def teardown
links "#{BASE_SPEC_LINK}/observation.html#search"
validates resource: "Observation", methods: ["search"]
}
skip 'Could not create Observations in setup.' unless (@obs_a && @obs_b && @obs_c && @obs_d)

skip 'TODO: https://github.com/FirelyTeam/spark/issues/308'

assert (@obs_a && @obs_b && @obs_c && @obs_d), 'Could not create Observations in setup.'

options = {
:search => {
Expand Down Expand Up @@ -616,7 +636,10 @@ def teardown
links "#{BASE_SPEC_LINK}/observation.html#search"
validates resource: "Observation", methods: ["search"]
}
skip 'Could not create Observations in setup.' unless (@obs_a && @obs_e && @obs_f)

skip 'TODO: https://github.com/FirelyTeam/spark/issues/308'

assert (@obs_a && @obs_e && @obs_f), 'Could not create Observations in setup.'

options = {
:search => {
Expand Down Expand Up @@ -653,7 +676,9 @@ def teardown
links "#{BASE_SPEC_LINK}/patient.html#search"
validates resource: "Patient", methods: ["search"]
}
skip 'Could not find a patient to search on in setup.' unless @read_entire_feed

assert @read_entire_feed, 'Could not find a patient to search on in setup.'

# how many patients in the bundle have no gender?
expected = 0
@entries.each do |entry|
Expand Down Expand Up @@ -705,6 +730,9 @@ def teardown
links "#{BASE_SPEC_LINK}/patient.html#search"
validates resource: "Patient", methods: ["search"]
}

skip 'TODO: https://github.com/FirelyTeam/spark/issues/309'

# a malformed parameters are non-existing parameters, and they should be ignored
options = {
:search => {
Expand Down

0 comments on commit 2e19fd0

Please sign in to comment.