webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailActions.test.js in katello-3.13.4 vs webpack/scenes/Subscriptions/Details/__tests__/SubscriptionDetailActions.test.js in katello-3.14.0.rc1
- old
+ new
@@ -20,28 +20,28 @@
describe('subscription detail actions', () => {
describe('loadSubscriptionDetails', () => {
it(
'creates SUBSCRIPTION_DETAILS_REQUEST and then fails with 500',
- () => {
+ async () => {
mockErrorRequest({
url: endpoint,
});
- return store.dispatch(loadSubscriptionDetails(1))
- .then(() => expect(store.getActions())
- .toEqual(loadSubscriptionsDetailsFailureActions));
+ await store.dispatch(loadSubscriptionDetails(1));
+ expect(store.getActions())
+ .toEqual(loadSubscriptionsDetailsFailureActions);
},
);
it(
'creates SUBSCRIPTION_DETAILS_SUCCESS and ends with success',
- () => {
+ async () => {
mockRequest({
url: endpoint,
response: subDetails,
});
- return store.dispatch(loadSubscriptionDetails(1))
- .then(() => expect(store.getActions())
- .toEqual(loadSubscriptionsDetailsSuccessActions));
+ await store.dispatch(loadSubscriptionDetails(1));
+ expect(store.getActions())
+ .toEqual(loadSubscriptionsDetailsSuccessActions);
},
);
});
});