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

Being able to assert only "/" on a GET HTTP call #419

Open
Z31ADHER opened this issue Dec 23, 2024 · 0 comments
Open

Being able to assert only "/" on a GET HTTP call #419

Z31ADHER opened this issue Dec 23, 2024 · 0 comments

Comments

@Z31ADHER
Copy link

Currently, it is impossible to assert the root of an API using tzatziki. The following will return an error on uri format.

The steps  :

        When we get "/"
        Then we receive a status OK_200 and only:
"""
// your body here
"""

Stacktrace of the error

java.lang.AssertionError: invalid uri: /
	at org.junit.Assert.fail(Assert.java:89)
	at com.decathlon.tzatziki.utils.MockFaster.match(MockFaster.java:147)
	at com.decathlon.tzatziki.utils.MockFaster.target(MockFaster.java:162)
	at com.decathlon.tzatziki.steps.HttpSteps.lambda$call$17(HttpSteps.java:368)
	at com.decathlon.tzatziki.utils.Guard.in(Guard.java:50)

Seems like there is a constraint on having at least one character after the root in the RegEx for the URI pattern

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

1 participant