mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 21:45:50 +01:00
add fail pattern for resolve warning
This commit is contained in:
@@ -53,6 +53,7 @@ class AccessTokenServiceSpec extends FunSuite with ServiceSpecBase {
|
|||||||
val (id, token) = AccessTokenService.generateAccessToken("root", "note")
|
val (id, token) = AccessTokenService.generateAccessToken("root", "note")
|
||||||
assert(AccessTokenService.getAccountByAccessToken(token) match {
|
assert(AccessTokenService.getAccountByAccessToken(token) match {
|
||||||
case Some(user) => user.userName == "root"
|
case Some(user) => user.userName == "root"
|
||||||
|
case _ => fail()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -88,6 +89,7 @@ class AccessTokenServiceSpec extends FunSuite with ServiceSpecBase {
|
|||||||
|
|
||||||
assert(AccessTokenService.getAccountByAccessToken(token) match {
|
assert(AccessTokenService.getAccountByAccessToken(token) match {
|
||||||
case Some(user) => user.userName == "user3"
|
case Some(user) => user.userName == "user3"
|
||||||
|
case _ => fail()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user