fixed karma

This commit is contained in:
Phil Hughes 2018-07-03 08:56:47 +01:00
parent 9c8d80796d
commit 2848ed1f40
No known key found for this signature in database
GPG key ID: 32245528C52E0F9F
2 changed files with 4 additions and 3 deletions

View file

@ -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',
{

View file

@ -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 }],
[