aboutsummaryrefslogtreecommitdiff
path: root/Timeline.Tests/Controllers
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-10-21 20:47:31 +0800
committer杨宇千 <crupest@outlook.com>2019-10-21 20:47:31 +0800
commitec7dfb73ace61a1aba5156cc1048cbe32ee1cee6 (patch)
treee6a9d4204e4fcd047cfcf5acd4ff566cf8bb69ff /Timeline.Tests/Controllers
parent0384a07729fc340852e4e862f431acd66771d48e (diff)
downloadtimeline-ec7dfb73ace61a1aba5156cc1048cbe32ee1cee6.tar.gz
timeline-ec7dfb73ace61a1aba5156cc1048cbe32ee1cee6.tar.bz2
timeline-ec7dfb73ace61a1aba5156cc1048cbe32ee1cee6.zip
...
Diffstat (limited to 'Timeline.Tests/Controllers')
-rw-r--r--Timeline.Tests/Controllers/TokenControllerTest.cs6
-rw-r--r--Timeline.Tests/Controllers/UserControllerTest.cs6
2 files changed, 6 insertions, 6 deletions
diff --git a/Timeline.Tests/Controllers/TokenControllerTest.cs b/Timeline.Tests/Controllers/TokenControllerTest.cs
index 71520e77..53b6c606 100644
--- a/Timeline.Tests/Controllers/TokenControllerTest.cs
+++ b/Timeline.Tests/Controllers/TokenControllerTest.cs
@@ -101,9 +101,9 @@ namespace Timeline.Tests.Controllers
public static IEnumerable<object[]> Verify_BadRequest_Data()
{
- yield return new object[] { new JwtTokenVerifyException(JwtTokenVerifyException.ErrorCodes.Expired), Verify.Expired };
- yield return new object[] { new JwtTokenVerifyException(JwtTokenVerifyException.ErrorCodes.IdClaimBadFormat), Verify.BadFormat };
- yield return new object[] { new BadTokenVersionException(), Verify.OldVersion };
+ yield return new object[] { new JwtVerifyException(JwtVerifyException.ErrorCodes.Expired), Verify.Expired };
+ yield return new object[] { new JwtVerifyException(JwtVerifyException.ErrorCodes.IdClaimBadFormat), Verify.BadFormat };
+ yield return new object[] { new JwtVerifyException(JwtVerifyException.ErrorCodes.OldVersion), Verify.OldVersion };
yield return new object[] { new UserNotExistException(), Verify.UserNotExist };
}
diff --git a/Timeline.Tests/Controllers/UserControllerTest.cs b/Timeline.Tests/Controllers/UserControllerTest.cs
index ddbc3fbc..471ed851 100644
--- a/Timeline.Tests/Controllers/UserControllerTest.cs
+++ b/Timeline.Tests/Controllers/UserControllerTest.cs
@@ -69,8 +69,8 @@ namespace Timeline.Tests.Controllers
}
[Theory]
- [InlineData(PutResult.Created, true)]
- [InlineData(PutResult.Modified, false)]
+ [InlineData(PutResult.Create, true)]
+ [InlineData(PutResult.Modify, false)]
public async Task Put_Success(PutResult result, bool create)
{
const string username = "aaa";
@@ -176,7 +176,7 @@ namespace Timeline.Tests.Controllers
[Theory]
[InlineData(typeof(UserNotExistException), Op.ChangeUsername.NotExist)]
- [InlineData(typeof(UserAlreadyExistException), Op.ChangeUsername.AlreadyExist)]
+ [InlineData(typeof(UsernameConfictException), Op.ChangeUsername.AlreadyExist)]
public async Task Op_ChangeUsername_Failure(Type exceptionType, int code)
{
const string oldUsername = "aaa";