use testAction for validateProjectBilling

This commit is contained in:
Dennis Tang 2018-05-23 19:59:32 +02:00
parent 303af892be
commit fb9d8b9b49
1 changed files with 11 additions and 8 deletions

View File

@ -69,14 +69,17 @@ describe('GCP Cluster Dropdown Store Actions', () => {
describe('validateProjectBilling', () => {
it('checks project billing status from Google API', done => {
store
.dispatch('validateProjectBilling')
.then(() => {
expect(store.state.projectHasBillingEnabled).toBeTruthy();
done();
})
.catch(done.fail);
testAction(
actions.validateProjectBilling,
true,
{
selectedProject: selectedProjectMock,
projectHasBillingEnabled: null,
},
[{ type: 'SET_PROJECT_BILLING_STATUS', payload: true }],
[],
done,
);
});
});