Skip to content

Commit

Permalink
use fresh connect resource in push notification tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fbuecklers committed Aug 21, 2016
1 parent 7a54473 commit e70c776
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/pushnotification.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('Test Push Notifications', function() {

it('should save registration in cookie', function() {
return db.Device.register("Android", TEST_GCM_DEVICE).then(function() {
return new DB.EntityManagerFactory(env.TEST_SERVER).createEntityManager(true).ready();
return new DB.EntityManagerFactory({host: env.TEST_SERVER, staleness: 0}).createEntityManager(true).ready();
}).then(function(newDB) {
expect(newDB.isDeviceRegistered).be.true;
expect(newDB.Device.isRegistered).be.true;
Expand Down Expand Up @@ -105,7 +105,7 @@ describe('Test Push Notifications', function() {

it('should remove cookie if device cannot be found', function() {
return db.Device.register("Android", TEST_GCM_DEVICE).then(function() {
return new DB.EntityManagerFactory(env.TEST_SERVER).createEntityManager(true).ready();
return new DB.EntityManagerFactory({host: env.TEST_SERVER, staleness: 0}).createEntityManager(true).ready();
}).then(function(newDB) {
expect(newDB.isDeviceRegistered).be.true;
expect(newDB.Device.isRegistered).be.true;
Expand All @@ -117,7 +117,7 @@ describe('Test Push Notifications', function() {
}));
}).then(function() {
DB.connector.Connector.connections = {};
return new DB.EntityManagerFactory(env.TEST_SERVER).createEntityManager(true).ready();
return new DB.EntityManagerFactory({host: env.TEST_SERVER, staleness: 0}).createEntityManager(true).ready();
}).then(function(newDB) {
expect(newDB.isDeviceRegistered).be.false;
expect(newDB.Device.isRegistered).be.false;
Expand Down

0 comments on commit e70c776

Please sign in to comment.