diff options
author | Dennis Tang <dtang@gitlab.com> | 2018-05-23 20:59:32 +0300 |
---|---|---|
committer | Dennis Tang <dtang@gitlab.com> | 2018-05-23 20:59:32 +0300 |
commit | fb9d8b9b493c9f7f548876c0b63ac83c83c2cff1 (patch) | |
tree | 6adb6907a15adba9c2eb71f07d8f8b210ad05561 /spec/javascripts/projects | |
parent | 303af892befc1b8d3408dde45cbf6c33d0e97d09 (diff) |
use testAction for validateProjectBilling
Diffstat (limited to 'spec/javascripts/projects')
-rw-r--r-- | spec/javascripts/projects/gke_cluster_dropdowns/stores/actions_spec.js | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/spec/javascripts/projects/gke_cluster_dropdowns/stores/actions_spec.js b/spec/javascripts/projects/gke_cluster_dropdowns/stores/actions_spec.js index d9292abc5e8..46085fe97aa 100644 --- a/spec/javascripts/projects/gke_cluster_dropdowns/stores/actions_spec.js +++ b/spec/javascripts/projects/gke_cluster_dropdowns/stores/actions_spec.js @@ -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, + ); }); }); |