debian-mirror-gitlab/spec/javascripts/environments/environment_stop_spec.js

24 lines
615 B
JavaScript
Raw Normal View History

2017-08-17 22:00:37 +05:30
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: {
2018-11-18 11:00:15 +05:30
environment: {},
2017-08-17 22:00:37 +05:30
},
}).$mount();
});
it('should render a button to stop the environment', () => {
expect(component.$el.tagName).toEqual('BUTTON');
2018-11-18 11:00:15 +05:30
expect(component.$el.getAttribute('data-original-title')).toEqual('Stop environment');
2017-08-17 22:00:37 +05:30
});
});