-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
The draftset data endpoints support uploading or requesting data in various content types. However, many of the tests only test these routes with a single content type, either directly or by using a test hepler function which hard-codes the content type. See for example get-draftset-quads-data which fetches the data using the get-user-draftset-quads-through-api hepler, which specifies the n-quads content type.
It should be possible to test all supported content types within each of these tests by refactoring the tests and helpers to be parameterised by content type and looping over all supported media types e.g.
(t/deftest get-draftset-quads-data
;; create draft and append data
(doseq [format conneg/show-data-formats]
(t/testing (str "Get data in format: " format)
(let [quads (help/get-user-draftset-quads-through-api hander draftest test-editor format)
expected ...]
(t/is (= (set quads) (set expected)))))))
Metadata
Metadata
Assignees
Labels
No labels