summaryrefslogtreecommitdiff
path: root/spec/frontend/notes/stores/actions_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/notes/stores/actions_spec.js')
-rw-r--r--spec/frontend/notes/stores/actions_spec.js79
1 files changed, 0 insertions, 79 deletions
diff --git a/spec/frontend/notes/stores/actions_spec.js b/spec/frontend/notes/stores/actions_spec.js
index f972ff0d2e4..9b7456d54bc 100644
--- a/spec/frontend/notes/stores/actions_spec.js
+++ b/spec/frontend/notes/stores/actions_spec.js
@@ -253,85 +253,6 @@ describe('Actions Notes Store', () => {
});
});
- describe('fetchData', () => {
- describe('given there are no notes', () => {
- const lastFetchedAt = '13579';
-
- beforeEach(() => {
- axiosMock
- .onGet(notesDataMock.notesPath)
- .replyOnce(200, { notes: [], last_fetched_at: lastFetchedAt });
- });
-
- it('should commit SET_LAST_FETCHED_AT', () =>
- testAction(
- actions.fetchData,
- undefined,
- { notesData: notesDataMock },
- [{ type: 'SET_LAST_FETCHED_AT', payload: lastFetchedAt }],
- [],
- ));
- });
-
- describe('given there are notes', () => {
- const lastFetchedAt = '12358';
-
- beforeEach(() => {
- axiosMock
- .onGet(notesDataMock.notesPath)
- .replyOnce(200, { notes: discussionMock.notes, last_fetched_at: lastFetchedAt });
- });
-
- it('should dispatch updateOrCreateNotes, startTaskList and commit SET_LAST_FETCHED_AT', () =>
- testAction(
- actions.fetchData,
- undefined,
- { notesData: notesDataMock },
- [{ type: 'SET_LAST_FETCHED_AT', payload: lastFetchedAt }],
- [
- { type: 'updateOrCreateNotes', payload: discussionMock.notes },
- { type: 'startTaskList' },
- { type: 'updateResolvableDiscussionsCounts' },
- ],
- ));
- });
-
- describe('paginated notes feature flag enabled', () => {
- const lastFetchedAt = '12358';
-
- beforeEach(() => {
- window.gon = { features: { paginatedNotes: true } };
-
- axiosMock.onGet(notesDataMock.notesPath).replyOnce(200, {
- notes: discussionMock.notes,
- more: false,
- last_fetched_at: lastFetchedAt,
- });
- });
-
- afterEach(() => {
- window.gon = null;
- });
-
- it('should dispatch setFetchingState, setNotesFetchedState, setLoadingState, updateOrCreateNotes, startTaskList and commit SET_LAST_FETCHED_AT', () => {
- return testAction(
- actions.fetchData,
- null,
- { notesData: notesDataMock, isFetching: true },
- [{ type: 'SET_LAST_FETCHED_AT', payload: lastFetchedAt }],
- [
- { type: 'setFetchingState', payload: false },
- { type: 'setNotesFetchedState', payload: true },
- { type: 'setLoadingState', payload: false },
- { type: 'updateOrCreateNotes', payload: discussionMock.notes },
- { type: 'startTaskList' },
- { type: 'updateResolvableDiscussionsCounts' },
- ],
- );
- });
- });
- });
-
describe('poll', () => {
beforeEach((done) => {
axiosMock