vendredi 10 juillet 2015

Karma Angular.js unit test expectPUT

I've got a problem with unit tests using karma.

  $httpBackend.expectPUT(envConfig.restUrl + 'customers/1').respond(200);
  it('should update"customer details" model', function() {
      expect(scope.customerDetails).toBeUndefined();
      $httpBackend.flush();

and the response:

 Error: Unsatisfied requests: PUT undefinedcustomers/1
 at Function.$httpBackend.verifyNoOutstandingExpectation 

Aucun commentaire:

Enregistrer un commentaire