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 | 26392cdd2028eff2132948d5cc5e36e08a2d69a9 (patch) | |
tree | 233518dd41d7747c8932eac67d48a62aa4203d53 /Timeline.Tests/Helpers/Authentication/AuthenticationExtensions.cs | |
parent | 38ff45fcc0b58a95ad52ba43a8be4ff466694269 (diff) | |
download | timeline-26392cdd2028eff2132948d5cc5e36e08a2d69a9.tar.gz timeline-26392cdd2028eff2132948d5cc5e36e08a2d69a9.tar.bz2 timeline-26392cdd2028eff2132948d5cc5e36e08a2d69a9.zip |
Add FluentAssertions.
Diffstat (limited to 'Timeline.Tests/Helpers/Authentication/AuthenticationExtensions.cs')
-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;
}
|