chore(deps): upgrade dev dependencies, fix tests (#1450) · mgonto/restangular@b583197

@@ -309,9 +309,9 @@ describe('Restangular', function() {

309309

CallbackManager.firstErrorInterceptor = function() {};

310310

CallbackManager.secondErrorInterceptor = function() {};

311311312-

spyOn(CallbackManager, 'successCallback').andCallThrough();

313-

spyOn(CallbackManager, 'firstErrorInterceptor').andCallThrough();

314-

spyOn(CallbackManager, 'secondErrorInterceptor').andCallThrough();

312+

spyOn(CallbackManager, 'successCallback').and.callThrough();

313+

spyOn(CallbackManager, 'firstErrorInterceptor').and.callThrough();

314+

spyOn(CallbackManager, 'secondErrorInterceptor').and.callThrough();

315315316316

Restangular.addErrorInterceptor(CallbackManager.firstErrorInterceptor);

317317

Restangular.addErrorInterceptor(CallbackManager.secondErrorInterceptor);

@@ -341,8 +341,8 @@ describe('Restangular', function() {

341341

return false; // prevent promise to be rejected

342342

};

343343344-

spyOn(CallbackManager, 'successCallback').andCallThrough();

345-

spyOn(CallbackManager, 'errorCallback').andCallThrough();

344+

spyOn(CallbackManager, 'successCallback').and.callThrough();

345+

spyOn(CallbackManager, 'errorCallback').and.callThrough();

346346347347

Restangular.addErrorInterceptor(CallbackManager.firstErrorInterceptor);

348348

Restangular.addErrorInterceptor(CallbackManager.secondErrorInterceptor);

@@ -371,9 +371,9 @@ describe('Restangular', function() {

371371

};

372372

CallbackManager.secondErrorInterceptor = function() {};

373373374-

spyOn(CallbackManager, 'successCallback').andCallThrough();

375-

spyOn(CallbackManager, 'firstErrorInterceptor').andCallThrough();

376-

spyOn(CallbackManager, 'secondErrorInterceptor').andCallThrough();

374+

spyOn(CallbackManager, 'successCallback').and.callThrough();

375+

spyOn(CallbackManager, 'firstErrorInterceptor').and.callThrough();

376+

spyOn(CallbackManager, 'secondErrorInterceptor').and.callThrough();

377377378378

Restangular.addErrorInterceptor(CallbackManager.firstErrorInterceptor);

379379

Restangular.addErrorInterceptor(CallbackManager.secondErrorInterceptor);

@@ -943,7 +943,7 @@ describe('Restangular', function() {

943943

expect(copiedAccount).not.toBe(accountsModel[0]);

944944945945

// create a spy for one of the methods to capture the value of 'this'

946-

spyOn(copiedAccount, 'getRestangularUrl').andCallFake(function() {

946+

spyOn(copiedAccount, 'getRestangularUrl').and.callFake(function() {

947947

that = this;

948948

});

949949

@@ -957,7 +957,7 @@ describe('Restangular', function() {

957957

// with fromServer=true

958958

restangularAccount1.get().then(responseHandler);

959959

$httpBackend.flush();

960-

var account = responseHandler.calls[0].args[0],

960+

var account = responseHandler.calls.argsFor(0)[0],

961961

copiedAccount = Restangular.copy(account);

962962

expect(account.fromServer).toEqual(true);

963963

expect(copiedAccount.fromServer).toEqual(true);

@@ -981,7 +981,7 @@ describe('Restangular', function() {

981981

// with collections, fromServer = true;

982982

restangularAccounts.getList().then(responseHandler);

983983

$httpBackend.flush();

984-

accounts = responseHandler.calls[0].args[0],

984+

accounts = responseHandler.calls.argsFor(0)[0],

985985

copiedAccounts = Restangular.copy(accounts);

986986

expect(accounts.fromServer).toEqual(true);

987987

expect(copiedAccounts.fromServer).toEqual(true);

@@ -1116,7 +1116,7 @@ describe('Restangular', function() {

11161116

Restangular.all('accounts').getList().then(responseHandler);

11171117

$httpBackend.flush();

111811181119-

var accounts = responseHandler.calls[0].args[0];

1119+

var accounts = responseHandler.calls.argsFor(0)[0];

11201120

var accountsCopy = accounts.clone();

1121112111221122

expect(accounts.customThing).toEqual('customValue');