summaryrefslogtreecommitdiff
path: root/spec/frontend/helpers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-15 12:06:12 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-15 12:06:12 +0000
commit3fc9a8e6957ddf75576dc63069c4c0249514499f (patch)
tree003e30463853843d6fb736a9396c7eb53a3dfc9a /spec/frontend/helpers
parente24153b0cb080b1b25076f8fd358b4273848f2e2 (diff)
downloadgitlab-ce-3fc9a8e6957ddf75576dc63069c4c0249514499f.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/helpers')
-rw-r--r--spec/frontend/helpers/monitor_helper_spec.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/frontend/helpers/monitor_helper_spec.js b/spec/frontend/helpers/monitor_helper_spec.js
index c36b603b251..0798ca580e2 100644
--- a/spec/frontend/helpers/monitor_helper_spec.js
+++ b/spec/frontend/helpers/monitor_helper_spec.js
@@ -81,6 +81,17 @@ describe('monitor helper', () => {
expect(result.name).toEqual('brpop, brpop');
});
+ it('supports hyphenated template variables', () => {
+ const config = { ...defaultConfig, name: 'expired - {{ test-attribute }}' };
+
+ const [result] = monitorHelper.makeDataSeries(
+ [{ metric: { 'test-attribute': 'test-attribute-value' }, values: series }],
+ config,
+ );
+
+ expect(result.name).toEqual('expired - test-attribute-value');
+ });
+
it('updates multiple series names from templates', () => {
const config = {
...defaultConfig,