gitlab-org--gitlab-foss/spec/javascripts/environments/environment_stop_spec.js

24 lines
615 B
JavaScript
Raw Normal View History

import Vue from 'vue';
2017-04-20 09:04:06 +00:00
import stopComp from '~/environments/components/environment_stop.vue';
2016-12-29 21:42:48 +00:00
describe('Stop Component', () => {
let StopComponent;
2016-11-19 13:29:48 +00:00
let component;
beforeEach(() => {
StopComponent = Vue.extend(stopComp);
spyOn(window, 'confirm').and.returnValue(true);
2017-02-09 11:52:22 +00:00
component = new StopComponent({
propsData: {
environment: {},
},
}).$mount();
});
2016-11-19 13:07:13 +00:00
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');
2016-11-19 13:29:48 +00:00
});
});