diff options
author | 杨宇千 <crupest@outlook.com> | 2019-10-19 17:33:38 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-10-19 17:33:38 +0800 |
commit | a268999b8c975588c01b345829edfc0099af6f93 (patch) | |
tree | f75fde126094e8310dd9e2588bb9b9e8baa79a3b /Timeline.Tests/Controllers/TokenControllerTest.cs | |
parent | fa2a3282c51d831b25f374803301e75eac15d11c (diff) | |
download | timeline-a268999b8c975588c01b345829edfc0099af6f93.tar.gz timeline-a268999b8c975588c01b345829edfc0099af6f93.tar.bz2 timeline-a268999b8c975588c01b345829edfc0099af6f93.zip |
...
Diffstat (limited to 'Timeline.Tests/Controllers/TokenControllerTest.cs')
-rw-r--r-- | Timeline.Tests/Controllers/TokenControllerTest.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Timeline.Tests/Controllers/TokenControllerTest.cs b/Timeline.Tests/Controllers/TokenControllerTest.cs index fff7c020..60ba75dc 100644 --- a/Timeline.Tests/Controllers/TokenControllerTest.cs +++ b/Timeline.Tests/Controllers/TokenControllerTest.cs @@ -79,6 +79,17 @@ namespace Timeline.Tests.Controllers .Which.Code.Should().Be(Create.BadCredential);
}
+ [Fact]
+ public async Task Verify_Ok()
+ {
+ const string token = "aaaaaaaaaaaaaa";
+ _mockUserService.Setup(s => s.VerifyToken(token)).ReturnsAsync(MockUser.User.Info);
+ var action = await _controller.Verify(new VerifyTokenRequest { Token = token });
+ action.Should().BeAssignableTo<OkObjectResult>()
+ .Which.Value.Should().BeAssignableTo<VerifyTokenResponse>()
+ .Which.User.Should().BeEquivalentTo(MockUser.User.Info);
+ }
+
// TODO! Verify unit tests
}
}
|