-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
Mock URL matching not working with query params #239
Comments
I believe this will also affect |
Yes it will affect both. I was thinking there was a better way to check the url than what is going on now .. so if you get a better way .. bring it on. |
@danielspaniel I don't really have enough context on all the different codepaths through here to know how to do it without a regex. Would there be a way to do something similar to |
For now, then go with your original idea .. if it works .. fine by me .. we can get fancy later ( whenever I remember the good idea I had ) |
I've been looking at adding a test by adding a custom adapter && buildUrl for the |
For context this is the test I'm trying to get to fail master...patocallaghan:patoc/mock_delete_update_param |
setting up the adapter like that might not work because in the shared test concept .. before the tests are run, in the helpers/utility-methods.js you will see a method so your buildUrl method is being ignored for that reason. The workaround is not so easy ... if you look at the way I am adding things to serializers ( serializerOptions ) .. you can see maybe one way around this solution ( which I would probably use to make adapterOptions .. add a buildUrl method for employee and slap that sucker into the adapter when it's assigned like I do with serializers . If you can't figure it out ( and I don't expect you too .. since it is an extra ordinary amount of hackery ) .. I can merge this and finish that part ( don't mind at all actually ..since I might as well continue the hackerooskyness in my own crazy style ? ) so whatever you like. |
yeah if you want to continue the hackery then go ahead :D I can do up the fix and test it locally myself |
got it .. should i merge this then? |
sure 👍 |
The following
mockUpdate
url matching fails if the url to match contains any query params.In our case we add a query param to all our requests in our adapter so our
PUT
url looks something like/ember/campaigns/1?app_id=abc123
with the additionalapp_id
. If you do some pre-processing to escape the string for regex special characters the match works again.I can open a PR with a failing test or possible fix later but wanted to open this anyway.
The text was updated successfully, but these errors were encountered: