Commit d871b9a4 authored by peterhegman's avatar peterhegman

Remove specs that were using `vm.$options.provide()`

parent 3f71e91a
import { createWrapper } from '@vue/test-utils'; import { createWrapper } from '@vue/test-utils';
import { extendedWrapper } from 'helpers/vue_test_utils_helper';
import MembersApp from '~/members/components/app.vue'; import MembersApp from '~/members/components/app.vue';
import { initMembersApp } from '~/members/index'; import { initMembersApp } from '~/members/index';
import { membersJsonString, members } from './mock_data'; import { membersJsonString, members } from './mock_data';
...@@ -17,7 +16,7 @@ describe('initMembersApp', () => { ...@@ -17,7 +16,7 @@ describe('initMembersApp', () => {
requestFormatter: () => ({}), requestFormatter: () => ({}),
filteredSearchBar: { show: false }, filteredSearchBar: { show: false },
}); });
wrapper = extendedWrapper(createWrapper(vm)); wrapper = createWrapper(vm);
}; };
beforeEach(() => { beforeEach(() => {
...@@ -43,33 +42,6 @@ describe('initMembersApp', () => { ...@@ -43,33 +42,6 @@ describe('initMembersApp', () => {
expect(wrapper.find(MembersApp).exists()).toBe(true); expect(wrapper.find(MembersApp).exists()).toBe(true);
}); });
it('sets `currentUserId` in provide/inject', () => {
setup();
expect(vm.$options.provide().currentUserId).toBe(123);
});
describe('when `gon.current_user_id` is not set (user is not logged in)', () => {
it('sets `currentUserId` as `null` in provide/inject', () => {
window.gon = {};
setup();
expect(vm.$options.provide().currentUserId).toBeNull();
});
});
it('parses and sets `data-source-id` as `sourceId` in provide/inject', () => {
setup();
expect(vm.$options.provide().sourceId).toBe(234);
});
it('parses and sets `data-can-manage-members` as `canManageMembers` in Vuex store', () => {
setup();
expect(vm.$options.provide().canManageMembers).toBe(true);
});
it('parses and sets `members` in Vuex store', () => { it('parses and sets `members` in Vuex store', () => {
setup(); setup();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment