This commit was merged in pull request #25.
This commit is contained in:
24
publisher/test/net/deertopia/publisher/server_test.clj
Normal file
24
publisher/test/net/deertopia/publisher/server_test.clj
Normal file
@@ -0,0 +1,24 @@
|
||||
(ns net.deertopia.publisher.server-test
|
||||
(:require [net.deertopia.publisher.server :as sut]
|
||||
[reitit.ring]
|
||||
[clojure.test :as t]
|
||||
[clojure.set :as set]
|
||||
[net.deertopia.publisher.server :as server]
|
||||
[net.deertopia.publisher.config :as cfg]
|
||||
[net.deertopia.publisher :as-alias publisher]))
|
||||
|
||||
(t/deftest server-is-running
|
||||
;; 서버가 벌써 시작한 다음에 이 테스트 하면 잘못됩니다.
|
||||
(assert (not= :running (server/status)))
|
||||
(server/start!)
|
||||
(t/is (= :running (server/status)))
|
||||
(server/stop!))
|
||||
|
||||
(t/deftest can-get-real-server-root
|
||||
;; 서버가 벌써 시작한 다음에 이 테스트 하면 잘못됩니다.
|
||||
(assert (not= :running (server/status)))
|
||||
(server/start!)
|
||||
(t/is (->> (format "http://localhost:%d" (::publisher/port cfg/*cfg*))
|
||||
slurp
|
||||
string?))
|
||||
(server/stop!))
|
||||
Reference in New Issue
Block a user