diff options
author | Felipe Artur <fcardozo@gitlab.com> | 2018-06-21 12:22:40 +0000 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2018-06-21 12:22:40 +0000 |
commit | 3e66795ef1ff1228906239763910b051d8afcc37 (patch) | |
tree | df6424d9ec008f5d1da455f8465681b371c4a11e /spec/javascripts/notes/stores/getters_spec.js | |
parent | 14e35ac9b19d358d84e0cfd167f74036937285b6 (diff) | |
download | gitlab-ce-3e66795ef1ff1228906239763910b051d8afcc37.tar.gz |
Changes tab VUE refactoring
Diffstat (limited to 'spec/javascripts/notes/stores/getters_spec.js')
-rw-r--r-- | spec/javascripts/notes/stores/getters_spec.js | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/spec/javascripts/notes/stores/getters_spec.js b/spec/javascripts/notes/stores/getters_spec.js index e5550580bf8..5501e50e97b 100644 --- a/spec/javascripts/notes/stores/getters_spec.js +++ b/spec/javascripts/notes/stores/getters_spec.js @@ -1,12 +1,18 @@ import * as getters from '~/notes/stores/getters'; -import { notesDataMock, userDataMock, noteableDataMock, individualNote, collapseNotesMock } from '../mock_data'; +import { + notesDataMock, + userDataMock, + noteableDataMock, + individualNote, + collapseNotesMock, +} from '../mock_data'; describe('Getters Notes Store', () => { let state; beforeEach(() => { state = { - notes: [individualNote], + discussions: [individualNote], targetNoteHash: 'hash', lastFetchedAt: 'timestamp', @@ -15,15 +21,15 @@ describe('Getters Notes Store', () => { noteableData: noteableDataMock, }; }); - describe('notes', () => { - it('should return all notes in the store', () => { - expect(getters.notes(state)).toEqual([individualNote]); + describe('discussions', () => { + it('should return all discussions in the store', () => { + expect(getters.discussions(state)).toEqual([individualNote]); }); }); describe('Collapsed notes', () => { const stateCollapsedNotes = { - notes: collapseNotesMock, + discussions: collapseNotesMock, targetNoteHash: 'hash', lastFetchedAt: 'timestamp', @@ -33,7 +39,7 @@ describe('Getters Notes Store', () => { }; it('should return a single system note when a description was updated multiple times', () => { - expect(getters.notes(stateCollapsedNotes).length).toEqual(1); + expect(getters.discussions(stateCollapsedNotes).length).toEqual(1); }); }); |