Commit d7623d54 authored by Illya Klymov's avatar Illya Klymov

Replace localVue.set with setData

parent eb64d772
import { shallowMount, createLocalVue } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { MERGE_DISABLED_TEXT_UNAPPROVED } from 'ee/vue_merge_request_widget/mixins/ready_to_merge'; import { MERGE_DISABLED_TEXT_UNAPPROVED } from 'ee/vue_merge_request_widget/mixins/ready_to_merge';
import MergeImmediatelyConfirmationDialog from 'ee/vue_merge_request_widget/components/merge_immediately_confirmation_dialog.vue'; import MergeImmediatelyConfirmationDialog from 'ee/vue_merge_request_widget/components/merge_immediately_confirmation_dialog.vue';
import ReadyToMerge from '~/vue_merge_request_widget/components/states/ready_to_merge.vue'; import ReadyToMerge from '~/vue_merge_request_widget/components/states/ready_to_merge.vue';
...@@ -10,7 +10,6 @@ import { ...@@ -10,7 +10,6 @@ import {
import { MERGE_DISABLED_TEXT } from '~/vue_merge_request_widget/mixins/ready_to_merge'; import { MERGE_DISABLED_TEXT } from '~/vue_merge_request_widget/mixins/ready_to_merge';
describe('ReadyToMerge', () => { describe('ReadyToMerge', () => {
const localVue = createLocalVue();
let wrapper; let wrapper;
let vm; let vm;
...@@ -48,7 +47,6 @@ describe('ReadyToMerge', () => { ...@@ -48,7 +47,6 @@ describe('ReadyToMerge', () => {
mr: { ...mr, ...mrUpdates }, mr: { ...mr, ...mrUpdates },
service, service,
}, },
localVue,
stubs: { stubs: {
MergeImmediatelyConfirmationDialog, MergeImmediatelyConfirmationDialog,
}, },
...@@ -76,7 +74,7 @@ describe('ReadyToMerge', () => { ...@@ -76,7 +74,7 @@ describe('ReadyToMerge', () => {
it('should return "Merge in progress"', () => { it('should return "Merge in progress"', () => {
factory(); factory();
localVue.set(vm, 'isMergingImmediately', true); wrapper.setData({ isMergingImmediately: true });
expect(vm.mergeButtonText).toEqual('Merge in progress'); expect(vm.mergeButtonText).toEqual('Merge in progress');
}); });
......
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