Commit 9e6c4e2c authored by Fernando's avatar Fernando

Fix pipeline failure

* Flip unit test names
* Add custom error for apiApprovalsPath not being provided
parent e238ceee
...@@ -121,7 +121,10 @@ export const fetchLicenseCheckApprovalRule = ({ dispatch, state }) => { ...@@ -121,7 +121,10 @@ export const fetchLicenseCheckApprovalRule = ({ dispatch, state }) => {
Pipelines cannot have approval rules. Pipelines cannot have approval rules.
*/ */
if (!state.approvalsApiPath) { if (!state.approvalsApiPath) {
return dispatch('receiveLicenseCheckApprovalRuleError'); return dispatch(
'receiveLicenseCheckApprovalRuleError',
new Error('approvalsApiPath not provided'),
);
} }
return axios return axios
......
...@@ -530,8 +530,8 @@ describe('License store actions', () => { ...@@ -530,8 +530,8 @@ describe('License store actions', () => {
); );
}); });
it('dispatches request/receive on error', done => { it('dispatches request/receive error when no approvalsAPiPath is provided', done => {
const error = new Error('Request failed with status code 500'); const error = new Error('approvalsApiPath not provided');
axiosMock.onGet(approvalsApiPath).replyOnce(500); axiosMock.onGet(approvalsApiPath).replyOnce(500);
testAction( testAction(
...@@ -547,7 +547,7 @@ describe('License store actions', () => { ...@@ -547,7 +547,7 @@ describe('License store actions', () => {
); );
}); });
it('dispatches request/receive error when no approvalsAPiPath is provided', done => { it('dispatches request/receive on error', done => {
const error = new Error('Request failed with status code 500'); const error = new Error('Request failed with status code 500');
axiosMock.onGet(approvalsApiPath).replyOnce(500); axiosMock.onGet(approvalsApiPath).replyOnce(500);
......
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