I have some http-mock request/responses I’d like to use only in a testing environment. Our API is completely built out, so I’d only like to use the mocks when running ‘ember test --server’ or ‘ember test’ (CI mode). I’m running into a few issues setting this up and was hoping someone had a solution.
When I run 'ember test --server ', tests run at an url that’s like http://localhost:7357/7150/tests/index.html
However, any time a request to the backend is made I get a 302 Moved Temporarily response. For example, when the client does a GET to what I would expect would be my data endpoint url in this testing mode: http://localhost:7357/brands/1, I get the 302 response and the url is redirected to http://localhost:7357/brands/1/test/index.html (which does not exists)
the mock works fine when I run tests in a browser using port 4200, ie http://0.0.0.0:4200/tests
I think I’m missing some magic configuration somewhere. Anyone know how I can get my ‘ember test --server’ to utilize my mocked out backend using ember-cli’s http-mocks?