gitlab-org--gitlab-foss/spec/javascripts/environments/environment_stop_spec.js
2018-07-10 08:11:04 +00:00

23 lines
615 B
JavaScript

import Vue from 'vue';
import stopComp from '~/environments/components/environment_stop.vue';
describe('Stop Component', () => {
let StopComponent;
let component;
beforeEach(() => {
StopComponent = Vue.extend(stopComp);
spyOn(window, 'confirm').and.returnValue(true);
component = new StopComponent({
propsData: {
environment: {},
},
}).$mount();
});
it('should render a button to stop the environment', () => {
expect(component.$el.tagName).toEqual('BUTTON');
expect(component.$el.getAttribute('data-original-title')).toEqual('Stop environment');
});
});