Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-30 03:07:52 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-30 03:07:52 +0300
commit4c016ad02422709d3a341215952a9b1cdb4a8451 (patch)
tree599e58df9e1f8987a9f9400b0abf61612e4e125a /spec/frontend/grafana_integration/store
parentcb3e6b9c1b020378b5f94b4c38319a2dc961de01 (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.js28
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);
+ });
+ });
+});