From 3e66795ef1ff1228906239763910b051d8afcc37 Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Thu, 21 Jun 2018 12:22:40 +0000 Subject: Changes tab VUE refactoring --- spec/javascripts/notes/stores/getters_spec.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'spec/javascripts/notes/stores/getters_spec.js') 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); }); }); -- cgit v1.2.1