summaryrefslogtreecommitdiff
path: root/spec/javascripts/projects
diff options
context:
space:
mode:
authorDennis Tang <dtang@gitlab.com>2018-05-23 19:59:32 +0200
committerDennis Tang <dtang@gitlab.com>2018-05-23 19:59:32 +0200
commitfb9d8b9b493c9f7f548876c0b63ac83c83c2cff1 (patch)
tree6adb6907a15adba9c2eb71f07d8f8b210ad05561 /spec/javascripts/projects
parent303af892befc1b8d3408dde45cbf6c33d0e97d09 (diff)
downloadgitlab-ce-fb9d8b9b493c9f7f548876c0b63ac83c83c2cff1.tar.gz
use testAction for validateProjectBilling
Diffstat (limited to 'spec/javascripts/projects')
-rw-r--r--spec/javascripts/projects/gke_cluster_dropdowns/stores/actions_spec.js19
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,
+ );
});
});