Fixed karma spec for getNoteFormData
Fixed toggling new notes caused by not returning the stores discussion
This commit is contained in:
parent
2497c29ef0
commit
e3cc9d53d2
|
|
@ -44,10 +44,10 @@ export const fetchDiscussions = ({ commit }, path) =>
|
|||
commit(types.SET_INITIAL_DISCUSSIONS, discussions);
|
||||
});
|
||||
|
||||
export const updateDiscussion = ({ commit }, discussion) => {
|
||||
export const updateDiscussion = ({ commit, state }, discussion) => {
|
||||
commit(types.UPDATE_DISCUSSION, discussion);
|
||||
|
||||
return discussion;
|
||||
return utils.findNoteObjectById(state.discussions, discussion.id);
|
||||
};
|
||||
|
||||
export const deleteNote = ({ commit, dispatch }, note) =>
|
||||
|
|
|
|||
|
|
@ -3687,9 +3687,6 @@ msgstr ""
|
|||
msgid "MergeRequests|Toggle comments for this file"
|
||||
msgstr ""
|
||||
|
||||
msgid "MergeRequests|Updating discussions failed"
|
||||
msgstr ""
|
||||
|
||||
msgid "MergeRequests|View file @ %{commitId}"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ describe('DiffsStoreUtils', () => {
|
|||
note_project_id: '',
|
||||
target_type: options.noteableType,
|
||||
target_id: options.noteableData.id,
|
||||
return_discussion: 'true',
|
||||
note: {
|
||||
noteable_type: options.noteableType,
|
||||
noteable_id: options.noteableData.id,
|
||||
|
|
|
|||
Loading…
Reference in New Issue