Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/reports/store/actions_spec.js')
-rw-r--r--spec/frontend/reports/store/actions_spec.js30
1 files changed, 15 insertions, 15 deletions
diff --git a/spec/frontend/reports/store/actions_spec.js b/spec/frontend/reports/store/actions_spec.js
index 3f189736922..b7c4a31b1c8 100644
--- a/spec/frontend/reports/store/actions_spec.js
+++ b/spec/frontend/reports/store/actions_spec.js
@@ -11,7 +11,7 @@ import {
receiveReportsSuccess,
receiveReportsError,
openModal,
- setModalData,
+ closeModal,
} from '~/reports/store/actions';
import state from '~/reports/store/state';
import * as types from '~/reports/store/mutation_types';
@@ -24,7 +24,7 @@ describe('Reports Store Actions', () => {
});
describe('setEndpoint', () => {
- it('should commit SET_ENDPOINT mutation', done => {
+ it('should commit SET_ENDPOINT mutation', (done) => {
testAction(
setEndpoint,
'endpoint.json',
@@ -37,7 +37,7 @@ describe('Reports Store Actions', () => {
});
describe('requestReports', () => {
- it('should commit REQUEST_REPORTS mutation', done => {
+ it('should commit REQUEST_REPORTS mutation', (done) => {
testAction(requestReports, null, mockedState, [{ type: types.REQUEST_REPORTS }], [], done);
});
});
@@ -57,7 +57,7 @@ describe('Reports Store Actions', () => {
});
describe('success', () => {
- it('dispatches requestReports and receiveReportsSuccess ', done => {
+ it('dispatches requestReports and receiveReportsSuccess ', (done) => {
mock
.onGet(`${TEST_HOST}/endpoint.json`)
.replyOnce(200, { summary: {}, suites: [{ name: 'rspec' }] });
@@ -86,7 +86,7 @@ describe('Reports Store Actions', () => {
mock.onGet(`${TEST_HOST}/endpoint.json`).reply(500);
});
- it('dispatches requestReports and receiveReportsError ', done => {
+ it('dispatches requestReports and receiveReportsError ', (done) => {
testAction(
fetchReports,
null,
@@ -107,7 +107,7 @@ describe('Reports Store Actions', () => {
});
describe('receiveReportsSuccess', () => {
- it('should commit RECEIVE_REPORTS_SUCCESS mutation with 200', done => {
+ it('should commit RECEIVE_REPORTS_SUCCESS mutation with 200', (done) => {
testAction(
receiveReportsSuccess,
{ data: { summary: {} }, status: 200 },
@@ -118,7 +118,7 @@ describe('Reports Store Actions', () => {
);
});
- it('should not commit RECEIVE_REPORTS_SUCCESS mutation with 204', done => {
+ it('should not commit RECEIVE_REPORTS_SUCCESS mutation with 204', (done) => {
testAction(
receiveReportsSuccess,
{ data: { summary: {} }, status: 204 },
@@ -131,7 +131,7 @@ describe('Reports Store Actions', () => {
});
describe('receiveReportsError', () => {
- it('should commit RECEIVE_REPORTS_ERROR mutation', done => {
+ it('should commit RECEIVE_REPORTS_ERROR mutation', (done) => {
testAction(
receiveReportsError,
null,
@@ -144,25 +144,25 @@ describe('Reports Store Actions', () => {
});
describe('openModal', () => {
- it('should dispatch setModalData', done => {
+ it('should commit SET_ISSUE_MODAL_DATA', (done) => {
testAction(
openModal,
{ name: 'foo' },
mockedState,
+ [{ type: types.SET_ISSUE_MODAL_DATA, payload: { name: 'foo' } }],
[],
- [{ type: 'setModalData', payload: { name: 'foo' } }],
done,
);
});
});
- describe('setModalData', () => {
- it('should commit SET_ISSUE_MODAL_DATA', done => {
+ describe('closeModal', () => {
+ it('should commit RESET_ISSUE_MODAL_DATA', (done) => {
testAction(
- setModalData,
- { name: 'foo' },
+ closeModal,
+ {},
mockedState,
- [{ type: types.SET_ISSUE_MODAL_DATA, payload: { name: 'foo' } }],
+ [{ type: types.RESET_ISSUE_MODAL_DATA, payload: {} }],
[],
done,
);