0
    // Devices call
    httpBackend.expect('GET', '/v1/devices/machine/22')
        .respond(200,mock_Device);

    //DevicesConfig call
    httpBackend.expect('GET', '/v2/devices/config/19442')
        .respond(200,mock_Devices_Config);

    //LatestDevices call
    httpBackend.expect('GET', '/v1/devices/latest/19442')
        .respond(200,mock_Devices_Latest);

    //Machinehistory call
    httpBackend.expect('GET', '/v1/devices/history/19442/5')
        .respond(200,mock_Machine_History);

it('It should fetch all machines details', function() {
    httpBackend.flush();
    scope.getMachines(); --Controller Call

}

In controller i will make a call for service which is in promise.All the calls are passed except machinehistory call which is getting

Error: Unsatisfied requests:

Please help me to sort out this error.

4
  • The Get url , exist? Try it in web browser Commented Dec 18, 2015 at 9:27
  • yes its working fine Commented Dec 18, 2015 at 9:28
  • if the promises is resolved the data then the url will get unsatisfied request? Commented Dec 18, 2015 at 9:29
  • Possible duplicate of AngularJS Issues mocking httpGET request Commented Dec 18, 2015 at 11:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.