fixed karma
This commit is contained in:
parent
9c8d80796d
commit
2848ed1f40
2 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
import Visibility from 'visibilityjs';
|
||||
import axios from 'axios';
|
||||
import httpStatus from '../../../../lib/utils/http_status';
|
||||
import { __ } from '../../../../locale';
|
||||
import Poll from '../../../../lib/utils/poll';
|
||||
import service from '../../../services';
|
||||
|
@ -23,7 +24,7 @@ export const forcePipelineRequest = () => {
|
|||
|
||||
export const requestLatestPipeline = ({ commit }) => commit(types.REQUEST_LATEST_PIPELINE);
|
||||
export const receiveLatestPipelineError = ({ commit, dispatch }, err) => {
|
||||
if (err.response.status !== 404) {
|
||||
if (err.status !== httpStatus.NOT_FOUND) {
|
||||
dispatch(
|
||||
'setErrorMessage',
|
||||
{
|
||||
|
|
|
@ -59,7 +59,7 @@ describe('IDE pipelines actions', () => {
|
|||
it('commits error', done => {
|
||||
testAction(
|
||||
receiveLatestPipelineError,
|
||||
{ response: { status: 404 } },
|
||||
{ status: 404 },
|
||||
mockedState,
|
||||
[{ type: types.RECEIVE_LASTEST_PIPELINE_ERROR }],
|
||||
[{ type: 'stopPipelinePolling' }],
|
||||
|
@ -70,7 +70,7 @@ describe('IDE pipelines actions', () => {
|
|||
it('dispatches setErrorMessage is not 404', done => {
|
||||
testAction(
|
||||
receiveLatestPipelineError,
|
||||
{ response: { status: 500 } },
|
||||
{ status: 500 },
|
||||
mockedState,
|
||||
[{ type: types.RECEIVE_LASTEST_PIPELINE_ERROR }],
|
||||
[
|
||||
|
|
Loading…
Reference in a new issue