From 186b7d5b29396f1ec01b374e3168067bb3b573a1 Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Sun, 23 Dec 2018 17:42:43 -0600 Subject: [PATCH] Fix `/ping` unit test (now `/version`) --- src/test/nim/unit/tserver.nim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/test/nim/unit/tserver.nim b/src/test/nim/unit/tserver.nim index 46926ab..7c21ecd 100644 --- a/src/test/nim/unit/tserver.nim +++ b/src/test/nim/unit/tserver.nim @@ -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",