Skip to content

Commit

Permalink
add (failing) test
Browse files Browse the repository at this point in the history
  • Loading branch information
allentiak committed Dec 4, 2024
1 parent 6de4a94 commit 2d36ffd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion modules/rest-util/test/blaze/middleware/fhir/output_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,15 @@
(given (call binary-resource-handler-no-body {:headers {"accept" "text/plain"}})
:status := 200
[:headers "Content-Type"] := nil
:body := nil)))))
:body := nil)))

(testing "failing binary emit"
(testing "invalid base64 representation of a binary resource (from XML)"
(given (call (binary-resource-handler-200 {:content-type "text/plain" :data "MTANjECg=="}) {:headers {"accept" "application/fhir+xml"}})
:status := 500
[:headers "Content-Type"] := "application/fhir+xml;charset=utf-8"
[:body parse-xml :fhir/type] := :fhir/OperationOutcome
[:body parse-xml :issue 0 :diagnostics] := "Invalid white space character (0x1e) in text to output (in xml 1.1, could output as a character entity)")))))

(comment
(-> (call (binary-resource-handler-200 {:content-type "text/plain" :data "MTANjECg=="}) {:headers {"accept" "application/fhir+xml"}})
Expand Down

0 comments on commit 2d36ffd

Please sign in to comment.