debian-mirror-gitlab/spec/frontend/admin/users/components/app_spec.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
747 B
JavaScript
Raw Normal View History

2021-02-22 17:27:13 +05:30
import { shallowMount } from '@vue/test-utils';
import AdminUsersApp from '~/admin/users/components/app.vue';
import AdminUsersTable from '~/admin/users/components/users_table.vue';
import { users, paths } from '../mock_data';
describe('AdminUsersApp component', () => {
let wrapper;
const initComponent = (props = {}) => {
wrapper = shallowMount(AdminUsersApp, {
propsData: {
users,
paths,
...props,
},
});
};
describe('when initialized', () => {
beforeEach(() => {
initComponent();
});
it('renders the admin users table with props', () => {
2022-08-27 11:52:29 +05:30
expect(wrapper.findComponent(AdminUsersTable).props()).toEqual({
2021-02-22 17:27:13 +05:30
users,
paths,
});
});
});
});