develop #22

Merged
william merged 44 commits from develop into master 2021-12-14 23:59:36 -05:00
1 changed files with 3 additions and 3 deletions
Showing only changes of commit c54fcc7aef - Show all commits

View File

@ -14,6 +14,7 @@ import dev.fyloz.colorrecipesexplorer.utils.isAround
import io.jsonwebtoken.Jwts
import io.jsonwebtoken.jackson.io.JacksonDeserializer
import io.mockk.spyk
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import java.time.Instant
import kotlin.test.assertEquals
@ -36,8 +37,6 @@ class JwtServiceTest {
private val user = user()
private val userOutputDto = user.toOutputDto()
private val jwt =
"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIwIiwiZXhwIjoxNjM3NTA0NDYyLCJ1c2VyIjoie1wiaWRcIjowLFwiZmlyc3ROYW1lXCI6XCJmaXJzdE5hbWVcIixcImxhc3ROYW1lXCI6XCJsYXN0TmFtZVwiLFwiZ3JvdXBcIjpudWxsLFwicGVybWlzc2lvbnNcIjpbXSxcImV4cGxpY2l0UGVybWlzc2lvbnNcIjpbXSxcImxhc3RMb2dpblRpbWVcIjpudWxsfSJ9.tSU4gzkPIHldfGKwBuMg1qdQTWIA5kOzMDOBwQuj0S4"
// buildJwt()
@ -91,7 +90,8 @@ class JwtServiceTest {
// parseJwt()
@Test
fun `parseJwt() does things`() {
fun `parseJwt() returns expected user`() {
val jwt = jwtService.buildJwt(user)
val parsedUser = jwtService.parseJwt(jwt)
assertEquals(userOutputDto, parsedUser)