diff options
author | crupest <crupest@outlook.com> | 2022-04-08 22:37:11 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-04-08 22:37:11 +0800 |
commit | 7be5cbdb451d9985b19471c78a721d76f76bc1fd (patch) | |
tree | 215ff937679db1f62933360e8180d6a9e037303f /BackEnd/Timeline.Tests/IntegratedTests2/TimelinePostTest1.cs | |
parent | 625bc355418e6da5575a509af9be9a7869147993 (diff) | |
download | timeline-7be5cbdb451d9985b19471c78a721d76f76bc1fd.tar.gz timeline-7be5cbdb451d9985b19471c78a721d76f76bc1fd.tar.bz2 timeline-7be5cbdb451d9985b19471c78a721d76f76bc1fd.zip |
...
Diffstat (limited to 'BackEnd/Timeline.Tests/IntegratedTests2/TimelinePostTest1.cs')
-rw-r--r-- | BackEnd/Timeline.Tests/IntegratedTests2/TimelinePostTest1.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/BackEnd/Timeline.Tests/IntegratedTests2/TimelinePostTest1.cs b/BackEnd/Timeline.Tests/IntegratedTests2/TimelinePostTest1.cs index 412f0476..4ecb805c 100644 --- a/BackEnd/Timeline.Tests/IntegratedTests2/TimelinePostTest1.cs +++ b/BackEnd/Timeline.Tests/IntegratedTests2/TimelinePostTest1.cs @@ -99,6 +99,17 @@ namespace Timeline.Tests.IntegratedTests2 await client.TestJsonSendAsync(HttpMethod.Get, "v2/timelines/user/hello/posts", expectedStatusCode: HttpStatusCode.Forbidden); await client.TestJsonSendAsync(HttpMethod.Get, "v2/timelines/user/hello/posts/1", expectedStatusCode: HttpStatusCode.Forbidden); } + + [Fact] + public async Task ListAndGetNotFound() + { + var client = CreateClientAsUser(); + await client.TestJsonSendAsync(HttpMethod.Get, "v2/timelines/user/notexist/posts", expectedStatusCode: HttpStatusCode.NotFound); + await client.TestJsonSendAsync(HttpMethod.Get, "v2/timelines/user/notexist/posts/1", expectedStatusCode: HttpStatusCode.NotFound); + await client.TestJsonSendAsync(HttpMethod.Get, "v2/timelines/notexist/notexist/posts", expectedStatusCode: HttpStatusCode.NotFound); + await client.TestJsonSendAsync(HttpMethod.Get, "v2/timelines/notexist/notexist/posts/1", expectedStatusCode: HttpStatusCode.NotFound); + await client.TestJsonSendAsync(HttpMethod.Get, "v2/timelines/user/hello/posts/4", expectedStatusCode: HttpStatusCode.NotFound); + } } } |