I would like to test the route setup in my app. I'm using Qunit and the ember-testing helpers.
I have a test like the following:
test("visit can handle wrong urls", function() {
var urlToVisit = "/foo/bogus";
visit(urlToVisit).then(function () {
// this will show me /foo/bogus even though the route does not exist
console.log(app.__container__.lookup('router:main').location.path);
});
});
The problem is, I can't distinguish between a failed and a successful visit. Any ideas?