webpack/scenes/Subscriptions/Manifest/__tests__/manifest.fixtures.js in katello-3.8.0.rc1 vs webpack/scenes/Subscriptions/Manifest/__tests__/manifest.fixtures.js in katello-3.8.0.rc2
- old
+ new
@@ -1,6 +1,7 @@
import Immutable from 'seamless-immutable';
+import { toastErrorAction, failureAction } from '../../../../services/api/testHelpers';
export const manifestHistoryInitialState = Immutable({
loading: true,
results: [],
});
@@ -147,14 +148,12 @@
export const manifestHistoryFailureActions = [
{
type: 'MANIFEST_HISTORY_REQUEST',
},
- {
- result: new Error('Request failed with status code 422'),
- type: 'MANIFEST_HISTORY_FAILURE',
- },
+ failureAction('MANIFEST_HISTORY_FAILURE'),
+ toastErrorAction(),
];
export const uploadManifestSuccessActions = [
{
type: 'UPLOAD_MANIFEST_REQUEST',
@@ -167,14 +166,12 @@
export const uploadManifestFailureActions = [
{
type: 'UPLOAD_MANIFEST_REQUEST',
},
- {
- result: new Error('Request failed with status code 422'),
- type: 'UPLOAD_MANIFEST_FAILURE',
- },
+ failureAction('UPLOAD_MANIFEST_FAILURE'),
+ toastErrorAction(),
];
export const refreshManifestSuccessActions = [
{
type: 'REFRESH_MANIFEST_REQUEST',
@@ -187,14 +184,12 @@
export const refreshManifestFailureActions = [
{
type: 'REFRESH_MANIFEST_REQUEST',
},
- {
- result: new Error('Request failed with status code 422'),
- type: 'REFRESH_MANIFEST_FAILURE',
- },
+ failureAction('REFRESH_MANIFEST_FAILURE'),
+ toastErrorAction(),
];
export const deleteManifestSuccessActions = [
{
type: 'DELETE_MANIFEST_REQUEST',
@@ -207,10 +202,8 @@
export const deleteManifestFailureActions = [
{
type: 'DELETE_MANIFEST_REQUEST',
},
- {
- result: new Error('Request failed with status code 422'),
- type: 'DELETE_MANIFEST_FAILURE',
- },
+ failureAction('DELETE_MANIFEST_FAILURE'),
+ toastErrorAction(),
];