Browse Source

Minor test tweaks

Johannes Zellner 7 năm trước cách đây
mục cha
commit
26654857f8
1 tập tin đã thay đổi với 3 bổ sung5 xóa
  1. 3 5
      test/test.js

+ 3 - 5
test/test.js

@@ -79,7 +79,7 @@ describe('Application life cycle test SSO', function () {
 
     function getAppInfo() {
         var inspect = JSON.parse(execSync('cloudron inspect'));
-        app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0];
+        app = inspect.apps.filter(function (a) { return a.location === LOCATION || a.location === LOCATION + '2'; })[0];
         expect(app).to.be.an('object');
     }
 
@@ -152,13 +152,11 @@ describe('Application life cycle test SSO', function () {
     it('user story is still present', userStoryExists);
 
     it('move to different location', function () {
-        browser.manage().deleteAllCookies();
         execSync('cloudron configure --wait --location ' + LOCATION + '2 --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
-        var inspect = JSON.parse(execSync('cloudron inspect'));
-        app = inspect.apps.filter(function (a) { return a.location === LOCATION + '2'; })[0];
-        expect(app).to.be.an('object');
     });
 
+    it('can get app information', getAppInfo);
+
     // origin change requires new login
     it('can login', login);
     it('user story is still present', userStoryExists);