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

Router mixing similar routes #51

Open
pizerg opened this issue Jun 27, 2019 · 2 comments
Open

Router mixing similar routes #51

pizerg opened this issue Jun 27, 2019 · 2 comments

Comments

@pizerg
Copy link

pizerg commented Jun 27, 2019

Possible bug in Router, we have an api with two very similar paths /api/GetDevices and /api/GetDevice, while trying to ui test in iOS after setting up a response for each endpoint some times we're getting GetDevice's response for a call to GetDevices which makes the tests crash as the response is different and cannot be parsed by our app. I think the problem is in the matcher that sometimes is mixing responses in case of similar routes like ours.

@scottymac
Copy link

I'm seeing this as well -- in my case /workoutConfig is matching the /workout route. It appears to be variable as well -- sometimes it happens and sometimes it doesn't.

@scottymac
Copy link

So I took a look at the router and created some tests--turns out this is by design: paths are always treated as a regular expression. (Of course I realize now I should have clicked through to the above mentioned issue. 😂)

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

2 participants