I like to perform E2E testing using a real http backend.
As part of my E2E testing I want to create a test user in a beforeEach() function, and I would remove this user in an afterEach() function when I'm done testing.
So I have created a REST endpoint for creating users: /users/create And then I need to post a username and password to that Url.
But it seems it is not possible to inject the $http service in E2E tests for some reason.
So how can I make a POST request to /users/create in an E2E beforeEach() function?