summaryrefslogtreecommitdiff
path: root/spec/javascripts/vue_mr_widget/components/deployment_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/javascripts/vue_mr_widget/components/deployment_spec.js')
-rw-r--r--spec/javascripts/vue_mr_widget/components/deployment_spec.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/javascripts/vue_mr_widget/components/deployment_spec.js b/spec/javascripts/vue_mr_widget/components/deployment_spec.js
index 056b4df8fdc..e355416bd27 100644
--- a/spec/javascripts/vue_mr_widget/components/deployment_spec.js
+++ b/spec/javascripts/vue_mr_widget/components/deployment_spec.js
@@ -252,5 +252,33 @@ describe('Deployment component', () => {
);
});
});
+
+ describe('created', () => {
+ beforeEach(() => {
+ vm = mountComponent(Component, {
+ deployment: Object.assign({}, deploymentMockData, { status: 'created' }),
+ showMetrics: true,
+ });
+ });
+
+ it('renders information about created deployment', () => {
+ expect(vm.$el.querySelector('.js-deployment-info').textContent).toContain('Will deploy to');
+ });
+ });
+
+ describe('canceled', () => {
+ beforeEach(() => {
+ vm = mountComponent(Component, {
+ deployment: Object.assign({}, deploymentMockData, { status: 'canceled' }),
+ showMetrics: true,
+ });
+ });
+
+ it('renders information about canceled deployment', () => {
+ expect(vm.$el.querySelector('.js-deployment-info').textContent).toContain(
+ 'Failed to deploy to',
+ );
+ });
+ });
});
});