In an application I'm writing, we possibly fire more than 1 request (based on some preconditions) upon doing certain actions in the UI. I'm trying to write this in a test, but I'm finding a hard time trying to mock the request: if the request gets fired more than once, I each time get:
Error: Unexpected request: PUT my/test/url
No more request expected
Is there any way to have the mocked httpbackend respond to a request multiple times? (kind of like you could state in a Mockito verify how many times the action should be done on the mock)