diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-30 03:07:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-30 03:07:52 +0300 |
commit | 4c016ad02422709d3a341215952a9b1cdb4a8451 (patch) | |
tree | 599e58df9e1f8987a9f9400b0abf61612e4e125a /spec/frontend/grafana_integration/store | |
parent | cb3e6b9c1b020378b5f94b4c38319a2dc961de01 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/grafana_integration/store')
-rw-r--r-- | spec/frontend/grafana_integration/store/mutations_spec.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/frontend/grafana_integration/store/mutations_spec.js b/spec/frontend/grafana_integration/store/mutations_spec.js new file mode 100644 index 00000000000..d9b8c258623 --- /dev/null +++ b/spec/frontend/grafana_integration/store/mutations_spec.js @@ -0,0 +1,28 @@ +import mutations from '~/grafana_integration/store/mutations'; +import createState from '~/grafana_integration/store/state'; + +describe('grafana integration mutations', () => { + let localState; + + beforeEach(() => { + localState = createState(); + }); + + describe('SET_GRAFANA_URL', () => { + it('sets grafanaUrl', () => { + const mockUrl = 'mockUrl'; + mutations.SET_GRAFANA_URL(localState, mockUrl); + + expect(localState.grafanaUrl).toBe(mockUrl); + }); + }); + + describe('SET_GRAFANA_TOKEN', () => { + it('sets grafanaToken', () => { + const mockToken = 'mockToken'; + mutations.SET_GRAFANA_TOKEN(localState, mockToken); + + expect(localState.grafanaToken).toBe(mockToken); + }); + }); +}); |