Commit e3cc9d53 authored by Phil Hughes's avatar Phil Hughes Committed by André Luís

Fixed karma spec for getNoteFormData

Fixed toggling new notes caused by not returning the stores discussion
parent 2497c29e
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment