Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assert does not match the correct result code #46

Open
ghost opened this issue Jul 8, 2013 · 0 comments
Open

assert does not match the correct result code #46

ghost opened this issue Jul 8, 2013 · 0 comments

Comments

@ghost
Copy link

ghost commented Jul 8, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants