diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-08-03 12:45:43 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-08-03 12:45:43 +0300 |
commit | 94981308a028a1e6c8996701f324d0e0c0339e73 (patch) | |
tree | c08a76544b3d003e72961a60c9cec5b6b90aa97f /app | |
parent | 15511ed14f595b30de90f32b3751c8599550e4c7 (diff) |
Adds action spec to cover 204
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/reports/store/actions.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/assets/javascripts/reports/store/actions.js b/app/assets/javascripts/reports/store/actions.js index e8f6b53cea0..acabcc1d193 100644 --- a/app/assets/javascripts/reports/store/actions.js +++ b/app/assets/javascripts/reports/store/actions.js @@ -43,7 +43,9 @@ export const fetchReports = ({ state, dispatch }) => { }, data: state.endpoint, method: 'getReports', - successCallback: (response) => dispatch('receiveReportsSuccess', response), + successCallback: ({ data, status }) => dispatch('receiveReportsSuccess', { + data, status, + }), errorCallback: () => dispatch('receiveReportsError'), }); @@ -52,7 +54,7 @@ export const fetchReports = ({ state, dispatch }) => { } else { axios .get(state.endpoint) - .then((response) => dispatch('receiveReportsSuccess', response)) + .then(({ data, status }) => dispatch('receiveReportsSuccess', { data, status })) .catch(() => dispatch('receiveReportsError')); } |