From c4214024bee00f5058cd897ab335ee38d5cdf789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Mon, 12 Sep 2016 13:21:07 +0200 Subject: [PATCH] Upgrade loopback-testing to the latest ^1.4 --- package.json | 2 +- test/access-control.integration.js | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 32c3f4e1..f0fd5c5b 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "karma-script-launcher": "^1.0.0", "loopback-boot": "^2.7.0", "loopback-datasource-juggler": "^2.19.1", - "loopback-testing": "~1.1.0", + "loopback-testing": "^1.4.0", "mocha": "^3.0.0", "phantomjs-prebuilt": "^2.1.7", "sinon": "^1.13.0", diff --git a/test/access-control.integration.js b/test/access-control.integration.js index b9ce7b37..23bcbf5c 100644 --- a/test/access-control.integration.js +++ b/test/access-control.integration.js @@ -24,6 +24,7 @@ describe('access control - integration', function() { }); lt.beforeEach.withApp(app); + lt.beforeEach.withUserModel('user'); /* describe('accessToken', function() { @@ -105,7 +106,7 @@ describe('access control - integration', function() { lt.describe.whenLoggedInAsUser(CURRENT_USER, function() { beforeEach(function() { - this.url = '/api/users/' + this.user.id + '?ok'; + this.url = '/api/users/' + this.loggedInAccessToken.userId + '?ok'; }); lt.describe.whenCalledRemotely('DELETE', '/api/users/:id', function() { lt.it.shouldBeAllowed(); @@ -262,7 +263,7 @@ describe('access control - integration', function() { var self = this; // Create an account under the given user app.models.accountWithReplaceOnPUTtrue.create({ - userId: self.user.id, + userId: self.loggedInAccessToken.userId, balance: 100 }, function(err, act) { actId = act.id; @@ -326,7 +327,7 @@ describe('access control - integration', function() { var self = this; // Create an account under the given user app.models.accountWithReplaceOnPUTfalse.create({ - userId: self.user.id, + userId: self.loggedInAccessToken.userId, balance: 100, }, function(err, act) { actId = act.id;