diff --git a/frontend/src/components/__tests__/organizations/OrganizationDetail.spec.js b/frontend/src/components/__tests__/organizations/OrganizationDetail.spec.js index 6157b5e8a..bbde819ad 100644 --- a/frontend/src/components/__tests__/organizations/OrganizationDetail.spec.js +++ b/frontend/src/components/__tests__/organizations/OrganizationDetail.spec.js @@ -25,41 +25,6 @@ vi.mock('../../../stores/UserStore', () => ({ vi.mock('@/packs/useFetchApi', () => ({ default: (url) => ({ - post: () => ({ - json: () => - Promise.resolve({ - data: { value: { msg: 'Success' } }, - error: { value: null } - }) - }), - put: () => ({ - json: () => - Promise.resolve({ - data: { value: { msg: 'Success' } }, - error: { value: null } - }) - }), - delete: () => ({ - json: () => - Promise.resolve({ - data: { value: null }, - error: { value: null } - }) - }), - get: () => ({ - json: () => - Promise.resolve({ - data: { - value: { - data: { - content: btoa('test content'), - sha: 'test-sha' - } - } - }, - error: { value: null } - }) - }), json: () => { console.log(url) if (url === '/organization/testorg') { @@ -121,12 +86,11 @@ vi.mock('@/packs/useFetchApi', () => ({ })) describe('OrganizationDetail', () => { - describe('mount', async () => { + describe('mount', () => { it('mounts correctly', async () => { const wrapper = createWrapper() expect(wrapper.exists()).toBe(true) await wrapper.vm.$nextTick() - console.log(wrapper.vm.organizationData) expect(wrapper.vm.organizationData).toEqual( expect.objectContaining({ name: 'testorg', diff --git a/frontend/src/components/__tests__/organizations/OrganizationSettings.spec.js b/frontend/src/components/__tests__/organizations/OrganizationSettings.spec.js index 5dc471028..be4a79278 100644 --- a/frontend/src/components/__tests__/organizations/OrganizationSettings.spec.js +++ b/frontend/src/components/__tests__/organizations/OrganizationSettings.spec.js @@ -100,7 +100,7 @@ vi.mock('@/packs/useFetchApi', () => ({ }) })) -describe('NewOrganization', () => { +describe('OrganizationSettings', () => { describe('mount', async () => { it('mounts correctly', async () => { const wrapper = createWrapper() diff --git a/frontend/src/components/organizations/OrganizationDetail.vue b/frontend/src/components/organizations/OrganizationDetail.vue index ce662fa8e..aa9f0e16f 100644 --- a/frontend/src/components/organizations/OrganizationDetail.vue +++ b/frontend/src/components/organizations/OrganizationDetail.vue @@ -109,7 +109,6 @@ import { ref, onMounted, watch } from 'vue' import InviteMember from './InviteMember.vue' import ProfileRepoList from '../shared/ProfileRepoList.vue' - import { useCookies } from 'vue3-cookies' import useFetchApi from '../../packs/useFetchApi' import { ElMessage } from 'element-plus' import useUserStore from '../../stores/UserStore' @@ -126,8 +125,6 @@ }) const membersList = ref([]) - const { cookies } = useCookies() - const userStore = useUserStore() const role = ref('')