Skip to content

Commit

Permalink
fixes to output_test after review
Browse files Browse the repository at this point in the history
  • Loading branch information
allentiak committed Nov 20, 2024
1 parent 741da0b commit e20aa99
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions modules/rest-util/test/blaze/middleware/fhir/output_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
(defn- binary-resource-handler-200
"A handler which uses the binary middleware and
returns a binary resource."
[{:keys [content-type data] :as _body}]
[{:keys [content-type data]}]
(wrap-binary-output
(fn [_ respond _]
(respond
Expand Down Expand Up @@ -166,8 +166,7 @@
[: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)")))

(deftest binary-resource-test

(testing "possible accept headers"
(testing "returning the resource"
(testing "JSON"
(given (call (binary-resource-handler-200 {:content-type "text/plain" :data "MTA1NjE0Cg=="}) {:headers {"accept" "application/fhir+json"}})
:status := 200
Expand All @@ -184,7 +183,7 @@
:contentType #fhir/code"text/plain"
:data #fhir/base64Binary"MTA1NjE0Cg=="})))

(testing "with data"
(testing "returning the data"
(testing "with content type"
(given (call (binary-resource-handler-200 {:content-type "text/plain" :data "MTA1NjE0Cg=="}) {:headers {"accept" "text/plain"}})
:status := 200
Expand Down

0 comments on commit e20aa99

Please sign in to comment.