blob: 37209bdc86cdac963671d7a8a1e10a79f21b3ed0 (
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
26
27
28
29
|
import { mountExtended } from 'helpers/vue_test_utils_helper';
import Deployment from '~/environments/components/deployment.vue';
import DeploymentStatusBadge from '~/environments/components/deployment_status_badge.vue';
import { resolvedEnvironment } from './graphql/mock_data';
describe('~/environments/components/deployment.vue', () => {
let wrapper;
const createWrapper = ({ propsData = {} } = {}) =>
mountExtended(Deployment, {
propsData: {
deployment: resolvedEnvironment.lastDeployment,
...propsData,
},
});
afterEach(() => {
wrapper?.destroy();
});
describe('status', () => {
it('should pass the deployable status to the badge', () => {
wrapper = createWrapper();
expect(wrapper.findComponent(DeploymentStatusBadge).props('status')).toBe(
resolvedEnvironment.lastDeployment.status,
);
});
});
});
|