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

fixed karma

parent 9c8d8079
import Visibility from 'visibilityjs'; import Visibility from 'visibilityjs';
import axios from 'axios'; import axios from 'axios';
import httpStatus from '../../../../lib/utils/http_status';
import { __ } from '../../../../locale'; import { __ } from '../../../../locale';
import Poll from '../../../../lib/utils/poll'; import Poll from '../../../../lib/utils/poll';
import service from '../../../services'; import service from '../../../services';
...@@ -23,7 +24,7 @@ export const forcePipelineRequest = () => { ...@@ -23,7 +24,7 @@ export const forcePipelineRequest = () => {
export const requestLatestPipeline = ({ commit }) => commit(types.REQUEST_LATEST_PIPELINE); export const requestLatestPipeline = ({ commit }) => commit(types.REQUEST_LATEST_PIPELINE);
export const receiveLatestPipelineError = ({ commit, dispatch }, err) => { export const receiveLatestPipelineError = ({ commit, dispatch }, err) => {
if (err.response.status !== 404) { if (err.status !== httpStatus.NOT_FOUND) {
dispatch( dispatch(
'setErrorMessage', 'setErrorMessage',
{ {
......
...@@ -59,7 +59,7 @@ describe('IDE pipelines actions', () => { ...@@ -59,7 +59,7 @@ describe('IDE pipelines actions', () => {
it('commits error', done => { it('commits error', done => {
testAction( testAction(
receiveLatestPipelineError, receiveLatestPipelineError,
{ response: { status: 404 } }, { status: 404 },
mockedState, mockedState,
[{ type: types.RECEIVE_LASTEST_PIPELINE_ERROR }], [{ type: types.RECEIVE_LASTEST_PIPELINE_ERROR }],
[{ type: 'stopPipelinePolling' }], [{ type: 'stopPipelinePolling' }],
...@@ -70,7 +70,7 @@ describe('IDE pipelines actions', () => { ...@@ -70,7 +70,7 @@ describe('IDE pipelines actions', () => {
it('dispatches setErrorMessage is not 404', done => { it('dispatches setErrorMessage is not 404', done => {
testAction( testAction(
receiveLatestPipelineError, receiveLatestPipelineError,
{ response: { status: 500 } }, { status: 500 },
mockedState, mockedState,
[{ type: types.RECEIVE_LASTEST_PIPELINE_ERROR }], [{ 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