Skip to content

Commit

Permalink
add test for empty body
Browse files Browse the repository at this point in the history
  • Loading branch information
allentiak committed Oct 21, 2024
1 parent 8ee6c1b commit e67ef82
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions modules/rest-util/test/blaze/middleware/fhir/output_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,11 @@
(given (call (binary-resource-handler-200 {:content-type "text/plain" :data nil}) {:headers {"accept" "text/plain"}})
:status := 200
[:headers "Content-Type"] := "text/plain"
[:body := nil])))

;; TODO: add a test case for a binary resource without a body
[:body := nil]))
(testing "without body with content type"
(given (call (binary-resource-handler-200 nil) {:headers {"accept" "text/plain"}})
:status := 200
[:headers "Content-Type"] := "application/octet-stream")))

(deftest not-acceptable-test
(is (nil? (call resource-handler-200 {:headers {"accept" "text/plain"}}))))

0 comments on commit e67ef82

Please sign in to comment.