eclipsesource / eclipsesource/restfuse

assert does not match the correct result code

Open
#46 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
95
Forks
28
PR merge metrics
No merged PRs in 30d

Description

I have a very simple test that is failing, maybe you can try it and reproduce the error in your pc?
this is the test:

@RunWith(HttpJUnitRunner.class)
public class TestMy{
@Rule
public com.eclipsesource.restfuse.Destination destination = this.getDestination()

```
@Context
private Response response;

@HttpTest(
method = Method.POST,
path = "/create",
content = USER1,
order = 200
)
public void testRegistrationUser1()
{
assertCreated(response);
}

@HttpTest(
method = Method.POST,
path = "/create",
content = USER1,
order = 210
)
public void testRegistrationUser1Again()
{
assertConflict(response);
}
```

-I am running this in jetty.
-in the second test I get a 409 back but the assertion fails.
-I tried this same thing (creating a user and then trying to create it again) with apache's httpclient and indeed I get a 409 back.

so it seems in some cases even though you get the correct code back the framework doesn't direct it through the right path.
regards.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.