From 7be5cbdb451d9985b19471c78a721d76f76bc1fd Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 8 Apr 2022 22:37:11 +0800 Subject: ... --- BackEnd/Timeline.Tests/IntegratedTests2/TimelinePostTest1.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'BackEnd/Timeline.Tests/IntegratedTests2/TimelinePostTest1.cs') 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); + } } } -- cgit v1.2.3