Skip to content
This repository has been archived by the owner on Apr 24, 2021. It is now read-only.

Commit

Permalink
Fixing up the ff tests to run actual code
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Gaunt committed Apr 4, 2016
1 parent c3aa353 commit b4a28ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion test/browser-tests/push-client/get-subscription.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ describe('Test getSubscription()', function() {
}

const EMPTY_SW_PATH = '/test/browser-tests/push-client/empty-sw.js';
const NON_EXISTANT_SW_PATH = '/test/browser-tests/push-client/doesnt-exist.js';
const EXAMPLE_SUBSCRIPTION = {
endpoint: '/endpoint'
};
Expand Down Expand Up @@ -95,7 +96,7 @@ describe('Test getSubscription()', function() {
it('should reject the promise when no registration is set', function(done) {
stateStub = window.StateStub.getStub();

const pushClient = new window.goog.propel.PropelClient(EMPTY_SW_PATH);
const pushClient = new window.goog.propel.PropelClient(NON_EXISTANT_SW_PATH);
pushClient.getSubscription()
.then(() => done(new Error('getSubscription should reject when no registration is available')))
.catch(() => done());
Expand Down
3 changes: 2 additions & 1 deletion test/browser-tests/push-client/unsubscribe.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ describe('Test unsubscribe()', function() {
}

const EMPTY_SW_PATH = '/test/browser-tests/push-client/empty-sw.js';
const NON_EXISTANT_SW_PATH = '/test/browser-tests/push-client/doesnt-exist.js';
const EXAMPLE_SUBSCRIPTION = {
endpoint: '/endpoint'
};
Expand Down Expand Up @@ -100,7 +101,7 @@ describe('Test unsubscribe()', function() {
stateStub = window.StateStub.getStub();
stateStub.setPermissionState('default');

const pushClient = new window.goog.propel.PropelClient(EMPTY_SW_PATH);
const pushClient = new window.goog.propel.PropelClient(NON_EXISTANT_SW_PATH);
pushClient.unsubscribe()
.then(() => done(new Error('Expected an error to be thrown when no registration')))
.catch(() => done());
Expand Down

0 comments on commit b4a28ab

Please sign in to comment.