summaryrefslogtreecommitdiff
path: root/spec/frontend/performance_bar/components/performance_bar_app_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/performance_bar/components/performance_bar_app_spec.js')
-rw-r--r--spec/frontend/performance_bar/components/performance_bar_app_spec.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/frontend/performance_bar/components/performance_bar_app_spec.js b/spec/frontend/performance_bar/components/performance_bar_app_spec.js
index 67a4259a8e3..2c9ab4bf78d 100644
--- a/spec/frontend/performance_bar/components/performance_bar_app_spec.js
+++ b/spec/frontend/performance_bar/components/performance_bar_app_spec.js
@@ -18,4 +18,15 @@ describe('performance bar app', () => {
it('sets the class to match the environment', () => {
expect(wrapper.element.getAttribute('class')).toContain('development');
});
+
+ describe('changeCurrentRequest', () => {
+ it('emits a change-request event', () => {
+ expect(wrapper.emitted('change-request')).toBeUndefined();
+
+ wrapper.vm.changeCurrentRequest('123');
+
+ expect(wrapper.emitted('change-request')).toBeDefined();
+ expect(wrapper.emitted('change-request')[0]).toEqual(['123']);
+ });
+ });
});