Commit f6721845 authored by mfluharty's avatar mfluharty

Fix blank error message for codequality diff

Pass createFlash an object instead of just the string

Changelog: fixed
EE: true
parent d43398cb
......@@ -42,7 +42,9 @@ export const fetchCodequality = ({ commit, state, dispatch }) => {
}
},
errorCallback: () =>
createFlash(__('Something went wrong on our end while loading the code quality diff.')),
createFlash({
message: __('Something went wrong on our end while loading the code quality diff.'),
}),
});
if (!Visibility.hidden()) {
......
......@@ -63,7 +63,9 @@ describe('EE DiffsStoreActions', () => {
testAction(fetchCodequality, {}, { endpoint }, [], [], () => {
expect(createFlash).toHaveBeenCalledTimes(1);
expect(createFlash).toHaveBeenCalledWith(expect.stringMatching('Something went wrong'));
expect(createFlash).toHaveBeenCalledWith({
message: 'Something went wrong on our end while loading the code quality diff.',
});
done();
});
});
......
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