@@ -22,6 +22,16 @@
|
||||
(testing "HEAD is served like GET, without a body"
|
||||
(is (= 200 (:status (request :head "/"))))))
|
||||
|
||||
(deftest origin-trial-header-test
|
||||
(let [get-root (fn [config]
|
||||
((core/make-app config) {:request-method :get :uri "/" :headers {}}))]
|
||||
(testing "the WebMCP origin-trial token is sent as an Origin-Trial header on the page"
|
||||
(is (= "tok-123" (get-in (get-root (assoc core/config :webmcp {:origin-trial-token "tok-123"}))
|
||||
[:headers "Origin-Trial"]))))
|
||||
(testing "no token, no header"
|
||||
(is (nil? (get-in (get-root (assoc core/config :webmcp {:origin-trial-token nil}))
|
||||
[:headers "Origin-Trial"]))))))
|
||||
|
||||
(deftest js-assets-test
|
||||
;; main.js only exists once script/ui-build has run, so only the miss is asserted here;
|
||||
;; the integration suite (which runs against the built image) checks the hit.
|
||||
|
||||
Reference in New Issue
Block a user