Skip to content

Commit 4e80591

Browse files
committed
add test for correct welcome text when none is set but app-name is
Signed-off-by: niwla23 <[email protected]>
1 parent 28330e4 commit 4e80591

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/unit/node/routes/login.test.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,5 +114,16 @@ describe("login", () => {
114114
expect(resp.status).toBe(200)
115115
expect(htmlContent).toContain(welcomeText)
116116
})
117+
118+
it("should return correct welcome text when none is set but app-name is", async () => {
119+
process.env.PASSWORD = previousEnvPassword
120+
const appName = "testnäme"
121+
const codeServer = await integration.setup([`--app-name=${appName}`], "")
122+
const resp = await codeServer.fetch("/login", { method: "GET" })
123+
124+
const htmlContent = await resp.text()
125+
expect(resp.status).toBe(200)
126+
expect(htmlContent).toContain(`Welcome to ${appName}`)
127+
})
117128
})
118129
})

0 commit comments

Comments
 (0)