Fix /ping unit test (now /version)

This commit is contained in:
Jonathan Bernard 2018-12-23 17:42:43 -06:00
parent 52eaa63f25
commit 186b7d5b29

View File

@ -6,6 +6,7 @@ from langutils import sameContents
import ../testutil
import ../../../main/nim/strawbosspkg/configuration
import ../../../main/nim/strawbosspkg/server
import ../../../main/nim/strawbosspkg/version
let apiBase = "http://localhost:8180/api"
let cfgFilePath = "src/test/json/strawboss.config.json"
@ -40,11 +41,11 @@ suite "strawboss server":
let tok = toJWT(cfg, session)
check fromJWT(cfg, tok) == session
test "ping":
let resp = http.get(apiBase & "/ping")
test "version":
let resp = http.get(apiBase & "/version")
check:
resp.status.startsWith("200")
resp.body == "\"pong\""
resp.body == "\"strawboss v" & SB_VERSION & "\""
test "fail auth":
let resp = http.post(apiBase & "/auth-token",