From 2aa5089fad056ec0bb08805f07aa21a4143fe5b9 Mon Sep 17 00:00:00 2001 From: bochaco Date: Mon, 25 Jun 2018 10:49:29 +0200 Subject: [PATCH 1/2] test/loginForTest: create test for app requesting permission to access other app's own container --- test/auth.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/auth.js b/test/auth.js index 26acdf6..2aa2d98 100644 --- a/test/auth.js +++ b/test/auth.js @@ -227,6 +227,17 @@ describe('Access Container', () => { }); }))); + it.only('request permissons for other app\' own container', async () => { + const primaryAppInfo = { id: 'primary', vendor: '1' }; + const primaryApp = await createAuthenticatedTestApp(primaryAppInfo, {}, { own_container: true }); + const perms = { + 'apps/primary': ['Read'] + }; + const secondaryAppInfo = { id: 'secondary', vendor: '2' }; + const secondApp = await createAuthenticatedTestApp(secondaryAppInfo, perms); + await secondApp.auth.getContainersPermissions(); + }); + it('returns empty object if no containers found for app', async () => { const appWithNoContainers = await createAuthenticatedTestApp(); const noContainers = await appWithNoContainers.auth.getContainersPermissions(); From 4f7ad5b62a1ed8a8498635583b46cbbd6a2dbc98 Mon Sep 17 00:00:00 2001 From: bochaco Date: Tue, 7 Aug 2018 13:31:08 +0100 Subject: [PATCH 2/2] style/tests: fix lint issues --- test/auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/auth.js b/test/auth.js index 2aa2d98..5fca830 100644 --- a/test/auth.js +++ b/test/auth.js @@ -229,7 +229,7 @@ describe('Access Container', () => { it.only('request permissons for other app\' own container', async () => { const primaryAppInfo = { id: 'primary', vendor: '1' }; - const primaryApp = await createAuthenticatedTestApp(primaryAppInfo, {}, { own_container: true }); + await createAuthenticatedTestApp(primaryAppInfo, {}, { own_container: true }); const perms = { 'apps/primary': ['Read'] };