Commit 452123eb authored by samdbeckham's avatar samdbeckham

Fixes the tests and lints the remaining files

parent 56a52339
<script>
import { mapActions } from 'vuex';
import { s__ } from '~/locale/index';
import LicensePackages from './license_packages.vue';
......
import Vue from 'vue';
import LicenseIssueBody from 'ee/vue_shared/license_management/components/license_issue_body.vue';
import { LICENSE_APPROVAL_STATUS } from 'ee/vue_shared/license_management/constants';
import { trimText } from 'spec/helpers/vue_component_helper';
import { mountComponentWithStore } from 'spec/helpers/vue_mount_component_helper';
import createStore from 'ee/vue_shared/license_management/store';
......@@ -22,42 +21,6 @@ describe('LicenseIssueBody', () => {
vm.$destroy();
});
describe('computed', () => {
describe('status', () => {
it('returns correct status for Approved licenses', done => {
vm.issue = { ...vm.issue, approvalStatus: LICENSE_APPROVAL_STATUS.APPROVED };
Vue.nextTick()
.then(() => {
expect(vm.status).toBe('Approved');
})
.then(done)
.catch(done.fail);
});
it('returns correct status for Blacklisted licenses', done => {
vm.issue = { ...vm.issue, approvalStatus: LICENSE_APPROVAL_STATUS.BLACKLISTED };
Vue.nextTick()
.then(() => {
expect(vm.status).toBe('Blacklisted');
})
.then(done)
.catch(done.fail);
});
it('returns correct status for Unapproved licenses', done => {
vm.issue = { ...vm.issue, approvalStatus: undefined };
Vue.nextTick()
.then(() => {
expect(vm.status).toBe('Unapproved');
})
.then(done)
.catch(done.fail);
});
});
});
describe('interaction', () => {
it('clicking the button triggers openModal with the current license', () => {
const linkEl = vm.$el.querySelector('.license-item > .btn-link');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment