You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently writing a integration spec for a ember-rails project where I want to test if our notfound a.k.a 404 route is triggered when a resource is requested that does not exist.
this is what I have so far:
test('renders not-found page for nonexisting ids',function(){expect(1);visit('/products/1');testHelper.handleFind('product',{id: "1"});andThen(function(){expectRouteToBe('not_found');//custom helper that checks if currentPath() equals X});});
The problem is that I do want to mock the /products/1 endpoint BUT i want it to fail and return a 404. As far as I'm aware off this functionality isn't implemented as of this moment (but I could be wrong).
When I look at the API documentation I see that there is a .andFail option for handleCreate() and handleUpdate() it would be nice to have this option for the handleFind() helper as well.
I'm willing to create a PR for this (including specs), as long as you are interested in this functionality / use-case.
The text was updated successfully, but these errors were encountered:
I'm currently writing a integration spec for a ember-rails project where I want to test if our
notfound
a.k.a 404 route is triggered when a resource is requested that does not exist.this is what I have so far:
The problem is that I do want to mock the
/products/1
endpoint BUT i want it to fail and return a 404. As far as I'm aware off this functionality isn't implemented as of this moment (but I could be wrong).When I look at the API documentation I see that there is a
.andFail
option forhandleCreate()
andhandleUpdate()
it would be nice to have this option for thehandleFind()
helper as well.I'm willing to create a PR for this (including specs), as long as you are interested in this functionality / use-case.
The text was updated successfully, but these errors were encountered: