Add test for get users
This commit is contained in:
parent
4cc3a6c070
commit
1060e35019
1 changed files with 6 additions and 0 deletions
|
@ -212,4 +212,10 @@ class UserRouteTest : ApiTest() {
|
||||||
assertEquals("", savedUser.email)
|
assertEquals("", savedUser.email)
|
||||||
assertEquals("\$2a\$10\$bETxbFPja1PyXVLybETxb.CWBYzyYdZpmCcA7NSIN8dkdzidt1Xv2", savedUser.password)
|
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)
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue