diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/autologin.spec.js | 6 | ||||
| -rw-r--r-- | test/components/Account.spec.js | 4 | ||||
| -rw-r--r-- | test/components/Connect.spec.js | 3 | ||||
| -rw-r--r-- | test/components/Login.spec.js | 2 | ||||
| -rw-r--r-- | test/components/Settings.spec.js | 6 | ||||
| -rw-r--r-- | test/login.spec.js | 4 | ||||
| -rw-r--r-- | test/logout.spec.js | 4 | ||||
| -rw-r--r-- | test/mocks/ipc.js | 2 |
8 files changed, 15 insertions, 16 deletions
diff --git a/test/autologin.spec.js b/test/autologin.spec.js index 0c031b15ca..b8051d800b 100644 --- a/test/autologin.spec.js +++ b/test/autologin.spec.js @@ -84,7 +84,7 @@ describe('autologin', () => { const { store, backend, mockIpc } = setupBackendAndStore(); mockIpc.getAccount = () => new Promise(r => r('123')); mockIpc.getAccountData = () => new Promise(r => r({ - paid_until: '2001-01-01T00:00:00', + expiry: '2001-01-01T00:00:00Z', })); return backend.autologin() @@ -92,7 +92,7 @@ describe('autologin', () => { const state = store.getState().account; expect(state.status).to.equal('ok'); expect(state.accountNumber).to.equal('123'); - expect(state.paidUntil).to.equal('2001-01-01T00:00:00'); + expect(state.expiry).to.equal('2001-01-01T00:00:00Z'); }); }); @@ -101,7 +101,7 @@ describe('autologin', () => { mockIpc.getAccount = () => new Promise(r => r('123')); mockIpc.getAccountData = () => new Promise(r => r({ - paid_until: '2001-01-01T00:00:00', + expiry: '2001-01-01T00:00:00Z', })); return backend.autologin() diff --git a/test/components/Account.spec.js b/test/components/Account.spec.js index 4372ac957e..6ebd4785e2 100644 --- a/test/components/Account.spec.js +++ b/test/components/Account.spec.js @@ -11,7 +11,7 @@ import type { AccountProps } from '../../app/components/Account'; describe('components/Account', () => { const state: AccountReduxState = { accountNumber: '1234', - paidUntil: (new Date('2038-01-01')).toISOString(), + expiry: (new Date('2038-01-01')).toISOString(), status: 'none', error: null }; @@ -59,7 +59,7 @@ describe('components/Account', () => { it('should display "out of time" message when account expired', () => { const expiredState: AccountReduxState = { accountNumber: '1234', - paidUntil: (new Date('2001-01-01')).toISOString(), + expiry: (new Date('2001-01-01')).toISOString(), status: 'none', error: null }; diff --git a/test/components/Connect.spec.js b/test/components/Connect.spec.js index 13700e8cca..d7a20daf2d 100644 --- a/test/components/Connect.spec.js +++ b/test/components/Connect.spec.js @@ -49,8 +49,7 @@ const defaultProps = { onExternalLink: noop, getServerInfo: (_) => { return defaultServer; }, - accountPaidUntil: '', + accountExpiry: '', preferredServer: '', connection: defaultConnection, }; - diff --git a/test/components/Login.spec.js b/test/components/Login.spec.js index d0874d4b74..3af6cb041b 100644 --- a/test/components/Login.spec.js +++ b/test/components/Login.spec.js @@ -85,7 +85,7 @@ describe('components/Login', () => { const defaultAccount = { accountNumber: null, - paidUntil: null, + expiry: null, status: 'none', error: null, }; diff --git a/test/components/Settings.spec.js b/test/components/Settings.spec.js index 705da60098..fd670931e8 100644 --- a/test/components/Settings.spec.js +++ b/test/components/Settings.spec.js @@ -13,21 +13,21 @@ import type { SettingsProps } from '../../app/components/Settings'; describe('components/Settings', () => { const loggedOutAccountState: AccountReduxState = { accountNumber: null, - paidUntil: null, + expiry: null, status: 'none', error: null }; const loggedInAccountState: AccountReduxState = { accountNumber: '1234', - paidUntil: (new Date('2038-01-01')).toISOString(), + expiry: (new Date('2038-01-01')).toISOString(), status: 'ok', error: null }; const unpaidAccountState: AccountReduxState = { accountNumber: '1234', - paidUntil: (new Date('2001-01-01')).toISOString(), + expiry: (new Date('2001-01-01')).toISOString(), status: 'ok', error: null }; diff --git a/test/login.spec.js b/test/login.spec.js index 5c7e0fe540..21564da822 100644 --- a/test/login.spec.js +++ b/test/login.spec.js @@ -31,7 +31,7 @@ describe('Logging in', () => { it('should put the account data in the state', () => { const { store, backend, mockIpc } = setupBackendAndStore(); mockIpc.getAccountData = () => new Promise(r => r({ - paid_until: '2001-01-01T00:00:00', + expiry: '2001-01-01T00:00:00Z', })); return backend.login('123') @@ -39,7 +39,7 @@ describe('Logging in', () => { const state = store.getState().account; expect(state.status).to.equal('ok'); expect(state.accountNumber).to.equal('123'); - expect(state.paidUntil).to.equal('2001-01-01T00:00:00'); + expect(state.expiry).to.equal('2001-01-01T00:00:00Z'); }); }); diff --git a/test/logout.spec.js b/test/logout.spec.js index f88df1bbc6..a5c8b29975 100644 --- a/test/logout.spec.js +++ b/test/logout.spec.js @@ -28,7 +28,7 @@ describe('logging out', () => { const { store, backend, mockIpc } = setupBackendAndStore(); mockIpc.getAccountData = () => new Promise(r => r({ - paid_until: '2001-01-01T00:00:00', + expiry: '2001-01-01T00:00:00.000Z', })); const action: any = accountActions.login(backend, '123'); store.dispatch(action); @@ -36,7 +36,7 @@ describe('logging out', () => { const expectedLogoutState = { status: 'none', accountNumber: null, - paidUntil: null, + expiry: null, error: null, }; diff --git a/test/mocks/ipc.js b/test/mocks/ipc.js index c182d45d21..3acdc2f76d 100644 --- a/test/mocks/ipc.js +++ b/test/mocks/ipc.js @@ -18,7 +18,7 @@ export function newMockIpc() { getAccountData: (accountNumber) => { return new Promise(r => r({ accountNumber: accountNumber, - paid_until: '', + expiry: '', })); }, getAccount: () => { |
