diff options
author | 杨宇千 <crupest@outlook.com> | 2019-08-27 13:01:49 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-08-27 13:01:49 +0800 |
commit | 0bbc5766119d9241473c737b5626e6b455ebba2b (patch) | |
tree | 4e83908948274b6a644ac208188373da0f8fe9ff /Timeline.Tests | |
parent | 99120ebedea6b8a9400901886a3f828d3466633b (diff) | |
download | timeline-0bbc5766119d9241473c737b5626e6b455ebba2b.tar.gz timeline-0bbc5766119d9241473c737b5626e6b455ebba2b.tar.bz2 timeline-0bbc5766119d9241473c737b5626e6b455ebba2b.zip |
Fix a bug.
Diffstat (limited to 'Timeline.Tests')
-rw-r--r-- | Timeline.Tests/IntegratedTests/UserAvatarTests.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Timeline.Tests/IntegratedTests/UserAvatarTests.cs b/Timeline.Tests/IntegratedTests/UserAvatarTests.cs index 1cb15edb..a98d807e 100644 --- a/Timeline.Tests/IntegratedTests/UserAvatarTests.cs +++ b/Timeline.Tests/IntegratedTests/UserAvatarTests.cs @@ -93,6 +93,17 @@ namespace Timeline.Tests.IntegratedTests RequestUri = new Uri(client.BaseAddress, "users/user/avatar"),
Method = HttpMethod.Get,
};
+ request.Headers.TryAddWithoutValidation("If-None-Match", "\"aaa\"");
+ var res = await client.SendAsync(request);
+ res.Should().HaveStatusCode(HttpStatusCode.OK);
+ }
+
+ {
+ var request = new HttpRequestMessage()
+ {
+ RequestUri = new Uri(client.BaseAddress, "users/user/avatar"),
+ Method = HttpMethod.Get,
+ };
request.Headers.Add ("If-None-Match", eTag.ToString());
var res = await client.SendAsync(request);
res.Should().HaveStatusCode(HttpStatusCode.NotModified);
|