UNPKG

trc-client-core

Version:
25 lines (19 loc) 791 B
import xhr from 'trc-client-core/src/utils/xhr'; import {FakeRefluxStore} from 'trc-client-core/src/utils/TestUtils'; import FdlpActions from 'trc-client-core/src/management/fdlp/FdlpActions'; import {FDLP_SESSIONS} from 'trc-client-core/src/constants/Endpoints'; describe('FdlpActions', () => { var TEST_QUERY = 'TEST_QUERY'; beforeEach(() => { spyOn(xhr, 'get').and.returnValue(Promise.resolve()); }); describe('getSessionData', () => { it('queries the correct endpoint for getSessionData', (done) => { FakeRefluxStore(FdlpActions, 'onGetSessionData', function() { expect(xhr.get).toHaveBeenCalledWith(FDLP_SESSIONS); done(); }); FdlpActions.getSessionData(); }); }); });