diff options
author | 杨宇千 <crupest@outlook.com> | 2019-08-11 15:34:59 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-08-11 15:34:59 +0800 |
commit | 4d15f7d696825f332884bb23e67760d6d1f5a736 (patch) | |
tree | 233518dd41d7747c8932eac67d48a62aa4203d53 /Timeline.Tests/Helpers/Authentication | |
parent | d97185e6152a327f6ef3b1873bfd86f1a3aac3a1 (diff) | |
download | timeline-4d15f7d696825f332884bb23e67760d6d1f5a736.tar.gz timeline-4d15f7d696825f332884bb23e67760d6d1f5a736.tar.bz2 timeline-4d15f7d696825f332884bb23e67760d6d1f5a736.zip |
Add FluentAssertions.
Diffstat (limited to 'Timeline.Tests/Helpers/Authentication')
-rw-r--r-- | Timeline.Tests/Helpers/Authentication/AuthenticationExtensions.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Timeline.Tests/Helpers/Authentication/AuthenticationExtensions.cs b/Timeline.Tests/Helpers/Authentication/AuthenticationExtensions.cs index 8a44c852..c8a79e58 100644 --- a/Timeline.Tests/Helpers/Authentication/AuthenticationExtensions.cs +++ b/Timeline.Tests/Helpers/Authentication/AuthenticationExtensions.cs @@ -14,7 +14,7 @@ namespace Timeline.Tests.Helpers.Authentication public static async Task<CreateTokenResponse> CreateUserTokenAsync(this HttpClient client, string username, string password, int? expireOffset = null)
{
var response = await client.PostAsJsonAsync(CreateTokenUrl, new CreateTokenRequest { Username = username, Password = password, ExpireOffset = expireOffset });
- response.AssertOk();
+ response.Should().HaveStatusCodeOk();
var result = JsonConvert.DeserializeObject<CreateTokenResponse>(await response.Content.ReadAsStringAsync());
return result;
}
|