diff --git a/src/components/Administer.test.jsx b/src/components/Administer.test.jsx
index 598ed4e..2cb5bb0 100644
--- a/src/components/Administer.test.jsx
+++ b/src/components/Administer.test.jsx
@@ -1,32 +1,31 @@
 import React from 'react';
-import { render, screen, waitFor, fireEvent, act } from '@testing-library/react';
+import { render, screen, waitFor, fireEvent } from '@testing-library/react';
 import { MemoryRouter } from 'react-router-dom';
 import '@testing-library/jest-dom';
-import axios from 'axios';
-import MockAdapter from 'axios-mock-adapter';
 import Administer from './Administer';
 
-describe('Administer Component', () => {
-  let mock;
+// 导入要模拟的API函数
+import { 
+  getAllUsers, 
+  searchUsers, 
+  getAllDiscounts,
+  getCurrentDiscount
+} from '../api/administer';
+import { getAnnouncements } from '../api/announcement';
 
-  beforeAll(() => {
-    mock = new MockAdapter(axios);
+// 模拟API模块
+jest.mock('../api/administer');
+jest.mock('../api/announcement');
+
+describe('Administer Component', () => {
+  beforeEach(() => {
+    // 清除所有模拟的调用信息
+    jest.clearAllMocks();
     localStorage.setItem('token', 'test-token');
   });
 
-  afterEach(() => {
-    mock.reset();
-  });
-
-  afterAll(() => {
-    mock.restore();
-  });
-
   test('renders user management tab by default', async () => {
-    mock.onGet('/user/allUser').reply(200, {
-      code: 200,
-      data: { data: [] }
-    });
+    getAllUsers.mockResolvedValue([]);
 
     render(
       <MemoryRouter>
@@ -53,10 +52,7 @@
       }
     ];
 
-    mock.onGet('/user/allUser').reply(200, {
-      code: 200,
-      data: { data: mockUsers }
-    });
+    getAllUsers.mockResolvedValue(mockUsers);
 
     render(
       <MemoryRouter>
@@ -73,14 +69,17 @@
     const mockUsers = [
       {
         username: 'searchuser',
-        authority: 'USER'
+        authority: 'USER',
+        registTime: '2023-01-01',
+        lastLogin: '2023-05-01',
+        upload: 1000,
+        download: 500,
+        shareRate: 2.0,
+        magicPoints: 100
       }
     ];
 
-    mock.onGet('/user/searchUser').reply(200, {
-      code: 200,
-      data: { data: mockUsers }
-    });
+    searchUsers.mockResolvedValue(mockUsers);
 
     render(
       <MemoryRouter>
@@ -99,15 +98,13 @@
   });
 
   test('switches between tabs', async () => {
-    mock.onGet('/user/allUser').reply(200, {
-      code: 200,
-      data: { data: [] }
-    });
-
-    mock.onGet('/discount/all').reply(200, {
-      code: 200,
-      data: { data: [] }
-    });
+    // 设置初始用户数据
+    getAllUsers.mockResolvedValue([]);
+    // 设置折扣数据
+    getAllDiscounts.mockResolvedValue([]);
+    getCurrentDiscount.mockResolvedValue(null);
+    // 设置公告数据
+    getAnnouncements.mockResolvedValue([]);
 
     render(
       <MemoryRouter>
@@ -115,10 +112,12 @@
       </MemoryRouter>
     );
 
+    // 切换到折扣管理标签
     fireEvent.click(screen.getByText('折扣管理'));
 
     await waitFor(() => {
       expect(screen.getByText('添加新折扣')).toBeInTheDocument();
+      // 可以添加更多断言来验证折扣管理页面的内容
     });
   });
 });
\ No newline at end of file
