summaryrefslogtreecommitdiff
path: root/spec/javascripts
diff options
context:
space:
mode:
authorNatalia Tepluhina <tarya.se@gmail.com>2018-12-14 16:44:45 +0200
committerAndré Luís <aluis@gitlab.com>2018-12-14 20:23:29 +0000
commit3c3701c97e49eb335db78248fc88daa5a4a85918 (patch)
treea5af767783cbbf9e56ca2f7f8acc29dfab0472b6 /spec/javascripts
parentdb30ddbf66a4bdaa091057ca1b781906db081845 (diff)
downloadgitlab-ce-3c3701c97e49eb335db78248fc88daa5a4a85918.tar.gz
Add a test for special characters
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/vue_shared/components/user_popover/user_popover_spec.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/javascripts/vue_shared/components/user_popover/user_popover_spec.js b/spec/javascripts/vue_shared/components/user_popover/user_popover_spec.js
index 1578b0f81f9..e16ab156679 100644
--- a/spec/javascripts/vue_shared/components/user_popover/user_popover_spec.js
+++ b/spec/javascripts/vue_shared/components/user_popover/user_popover_spec.js
@@ -101,6 +101,19 @@ describe('User Popover Component', () => {
expect(vm.$el.textContent).toContain('Engineer at GitLab');
});
+
+ it('should not encode special characters when we have bio and organization', () => {
+ const testProps = Object.assign({}, DEFAULT_PROPS);
+ testProps.user.bio = 'Manager & Team Lead';
+ testProps.user.organization = 'GitLab';
+
+ vm = mountComponent(UserPopover, {
+ ...DEFAULT_PROPS,
+ target: document.querySelector('.js-user-link'),
+ });
+
+ expect(vm.$el.textContent).toContain('Manager & Team Lead at GitLab');
+ });
});
describe('status data', () => {