Commit 2848ed1f authored by Phil Hughes's avatar Phil Hughes

fixed karma

parent 9c8d8079
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 }],
[
......
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