Update test/component/Elsa.Workflows.ComponentTests/Scenarios/Activities/Http/HttpEndpointTests.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
lukhipolito-nexxbiz 2025-12-03 15:30:00 +01:00 committed by GitHub
parent 536e908898
commit fc14e99ed4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -63,11 +63,15 @@ public class HttpEndpointTests(App app) : AppComponentTest(app)
{
// Arrange
var client = WorkflowServer.CreateHttpWorkflowClient();
var request = new HttpRequestMessage(HttpMethod.Patch, "test/multi-method");
// Act
var response = await client.SendAsync(request);
using (var request = new HttpRequestMessage(HttpMethod.Patch, "test/multi-method"))
{
// Act
var response = await client.SendAsync(request);
// Assert
// In this test environment, unsupported methods on unregistered endpoints return NotFound
Assert.Equal(HttpStatusCode.NotFound, response.StatusCode);
}
// Assert
// In this test environment, unsupported methods on unregistered endpoints return NotFound
Assert.Equal(HttpStatusCode.NotFound, response.StatusCode);