Add test for get users

This commit is contained in:
William Brawner 2023-10-16 21:11:57 -06:00
parent 4cc3a6c070
commit 1060e35019

View file

@ -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)
}
}