Skip to content

Commit

Permalink
fix: CDR-1471 change expected 406 to 415
Browse files Browse the repository at this point in the history
  • Loading branch information
vladislavploaia committed Jun 12, 2024
1 parent cdb03f4 commit a39b68e
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions tests/robot/TEMPLATE_TESTS/template_operations.robot
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Suite Setup Set Library Search Order For Tests
... Prefer=return=representation
get valid OPT file all_types/test_event.opt
upload OPT file
Should Be Equal ${response_code} ${406}
Should Be Equal ${response_code} ${415}
[Teardown] Run Keyword And Return Status (admin) delete OPT

3. Create Template With Content Type (application/json)
Expand All @@ -36,16 +36,16 @@ Suite Setup Set Library Search Order For Tests
prepare new request session no content header
... Prefer=return=representation
upload OPT file
Should Be Equal ${response_code} ${406}
Should Be Equal ${response_code} ${415}
[Teardown] Run Keyword And Return Status (admin) delete OPT

5. Create Template With No Headers
[Tags] Negative
prepare new request session no headers
... Prefer=return=representation
upload OPT file
Should Be Equal ${response_code} ${400}
Should Contain ${response.json()["message"]} Content-Type
Should Be Equal ${response_code} ${415}
Should Contain ${response.json()["error"]} Unsupported Media Type
[Teardown] Run Keyword And Return Status (admin) delete OPT

6. Get Template
Expand Down Expand Up @@ -74,17 +74,15 @@ Suite Setup Set Library Search Order For Tests
Should Be Equal As Strings ${resp.status_code} 200

9. Get Template With Accept (application/json)
## Must return 200, as per JIRA ticket CDR-1471 - but returns 400
[Tags] Positive not-ready
[Tags] Positive
prepare new request session no content header
... Prefer=return=representation
${resp} GET On Session ${SUT} /definition/template/adl1.4/${template_id} expected_status=anything
... headers=${headers}
Should Be Equal As Strings ${resp.status_code} 200

10. Get Template With Accept (application/openehr.wt+json)
## Must return 200, as per JIRA ticket CDR-1471 - but returns 406
[Tags] Positive not-ready
[Tags] Positive
prepare new request session no headers
... Accept=application/openehr.wt+json
... Prefer=return=representation
Expand All @@ -93,6 +91,7 @@ Suite Setup Set Library Search Order For Tests
Should Be Equal As Strings ${resp.status_code} 200

11. Get All Templates
[Tags] Positive
Set Test Variable ${template_id_1} ${template_id} #template_id created in '6. Get Template'
Upload OPT minimal/minimal_action.opt
Extract Template Id From OPT File
Expand Down

0 comments on commit a39b68e

Please sign in to comment.