blob: ef6a9b1e8fc1fc333f8f4c6db54d173b482277db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import Vue from 'vue';
import { removeBreakLine } from 'helpers/text_helper';
import mountComponent from 'helpers/vue_mount_component_helper';
import ShaMismatch from '~/vue_merge_request_widget/components/states/sha_mismatch.vue';
describe('ShaMismatch', () => {
let vm;
beforeEach(() => {
const Component = Vue.extend(ShaMismatch);
vm = mountComponent(Component);
});
afterEach(() => {
vm.$destroy();
});
it('should render information message', () => {
expect(vm.$el.querySelector('button').disabled).toEqual(true);
expect(removeBreakLine(vm.$el.textContent).trim()).toContain(
'The source branch HEAD has recently changed. Please reload the page and review the changes before merging',
);
});
});
|