summaryrefslogtreecommitdiff
path: root/spec/frontend/integrations/edit/components/jira_upgrade_cta_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/integrations/edit/components/jira_upgrade_cta_spec.js')
-rw-r--r--spec/frontend/integrations/edit/components/jira_upgrade_cta_spec.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/frontend/integrations/edit/components/jira_upgrade_cta_spec.js b/spec/frontend/integrations/edit/components/jira_upgrade_cta_spec.js
new file mode 100644
index 00000000000..e49a1619627
--- /dev/null
+++ b/spec/frontend/integrations/edit/components/jira_upgrade_cta_spec.js
@@ -0,0 +1,30 @@
+import { shallowMount } from '@vue/test-utils';
+import JiraUpgradeCta from '~/integrations/edit/components/jira_upgrade_cta.vue';
+
+describe('JiraUpgradeCta', () => {
+ let wrapper;
+
+ const contentMessage = 'Upgrade your plan to enable this feature of the Jira Integration.';
+
+ const createComponent = (propsData) => {
+ wrapper = shallowMount(JiraUpgradeCta, {
+ propsData,
+ });
+ };
+
+ afterEach(() => {
+ wrapper.destroy();
+ });
+
+ it('displays the correct message for premium and lower users', () => {
+ createComponent({ showPremiumMessage: true });
+ expect(wrapper.html()).toContain('This is a Premium feature');
+ expect(wrapper.html()).toContain(contentMessage);
+ });
+
+ it('displays the correct message for ultimate and lower users', () => {
+ createComponent({ showUltimateMessage: true });
+ expect(wrapper.html()).toContain('This is an Ultimate feature');
+ expect(wrapper.html()).toContain(contentMessage);
+ });
+});