Skip to content

Commit 10bb742

Browse files
committed
Added middleware test for forwarded requests
1 parent 5f996f9 commit 10bb742

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/AspNetCore.Tests/QueryMiddlewareTests.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,21 @@ public async Task HttpGet_BasicTest()
5656
Assert.Equal(Snapshot.Current(), Snapshot.New(result));
5757
}
5858

59+
[Fact]
60+
public async Task HttpGet_ForwardToNextMiddleware()
61+
{
62+
// arrange
63+
TestServer server = CreateTestServer();
64+
string query = "{ basic { a } }";
65+
66+
// act
67+
HttpResponseMessage message = await server.CreateClient()
68+
.GetAsync($"http://localhost:5000/1234");
69+
70+
// assert
71+
Assert.Equal(HttpStatusCode.NotFound, message.StatusCode);
72+
}
73+
5974
[Fact]
6075
public async Task HttpPost_WithScalarVariables()
6176
{

0 commit comments

Comments
 (0)