diff --git a/app/src/test/kotlin/com/wbrawner/twigs/server/api/UserRouteTest.kt b/app/src/test/kotlin/com/wbrawner/twigs/server/api/UserRouteTest.kt index c07d739..b08b0e6 100644 --- a/app/src/test/kotlin/com/wbrawner/twigs/server/api/UserRouteTest.kt +++ b/app/src/test/kotlin/com/wbrawner/twigs/server/api/UserRouteTest.kt @@ -212,4 +212,10 @@ class UserRouteTest : ApiTest() { assertEquals("", savedUser.email) assertEquals("\$2a\$10\$bETxbFPja1PyXVLybETxb.CWBYzyYdZpmCcA7NSIN8dkdzidt1Xv2", savedUser.password) } + + @Test + fun `get users requires authentication`() = apiTest { client -> + val response = client.get("/api/users") + assertEquals(HttpStatusCode.Unauthorized, response.status) + } } \ No newline at end of file