aboutsummaryrefslogtreecommitdiff
path: root/Timeline.Tests/Helpers/Authentication/AuthenticationExtensions.cs
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-08-11 16:12:23 +0800
committerGitHub <noreply@github.com>2019-08-11 16:12:23 +0800
commit285fe070388e48d82f008c3de5b0d7675f55ebfa (patch)
tree3e4e7de38b9f0e5832923a6bc1ce7872fc4370a5 /Timeline.Tests/Helpers/Authentication/AuthenticationExtensions.cs
parent38ff45fcc0b58a95ad52ba43a8be4ff466694269 (diff)
parent4b0d4ba4e79c1a2e22ccf131d1abdbf113d78b6a (diff)
downloadtimeline-285fe070388e48d82f008c3de5b0d7675f55ebfa.tar.gz
timeline-285fe070388e48d82f008c3de5b0d7675f55ebfa.tar.bz2
timeline-285fe070388e48d82f008c3de5b0d7675f55ebfa.zip
Merge pull request #39 from crupest/fluent-assertion
Use FluentAssertions.
Diffstat (limited to 'Timeline.Tests/Helpers/Authentication/AuthenticationExtensions.cs')
-rw-r--r--Timeline.Tests/Helpers/Authentication/AuthenticationExtensions.cs2
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;
}