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:
Diffstat (limited to 'spec/frontend/toggles/index_spec.js')
-rw-r--r--spec/frontend/toggles/index_spec.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/frontend/toggles/index_spec.js b/spec/frontend/toggles/index_spec.js
index 575b1b6080c..19c4d6f1f1d 100644
--- a/spec/frontend/toggles/index_spec.js
+++ b/spec/frontend/toggles/index_spec.js
@@ -99,10 +99,12 @@ describe('toggles/index.js', () => {
const name = 'toggle-name';
const help = 'Help text';
const foo = 'bar';
+ const id = 'an-id';
beforeEach(() => {
initToggleWithOptions({
name,
+ id,
isChecked: true,
disabled: true,
isLoading: true,
@@ -144,6 +146,10 @@ describe('toggles/index.js', () => {
it('passes custom dataset to the wrapper', () => {
expect(toggleWrapper.dataset.foo).toBe('bar');
});
+
+ it('passes an id to the wrapper', () => {
+ expect(toggleWrapper.id).toBe(id);
+ });
});
});
});