aboutsummaryrefslogtreecommitdiff
path: root/Timeline.Tests/IntegratedTests/UserAvatarTests.cs
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-08-27 13:01:49 +0800
committer杨宇千 <crupest@outlook.com>2019-08-27 13:01:49 +0800
commit1013af20669029f34a92a9c2b36baf962a480a6e (patch)
tree4e83908948274b6a644ac208188373da0f8fe9ff /Timeline.Tests/IntegratedTests/UserAvatarTests.cs
parent8f658ff4e6dd6553bcebc8647cf2e8ee6d4aa723 (diff)
downloadtimeline-1013af20669029f34a92a9c2b36baf962a480a6e.tar.gz
timeline-1013af20669029f34a92a9c2b36baf962a480a6e.tar.bz2
timeline-1013af20669029f34a92a9c2b36baf962a480a6e.zip
Fix a bug.
Diffstat (limited to 'Timeline.Tests/IntegratedTests/UserAvatarTests.cs')
-rw-r--r--Timeline.Tests/IntegratedTests/UserAvatarTests.cs11
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);