From 26df54a09d7e195d0e33266e0b34f8e11d072277 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Sun, 7 Dec 2025 03:24:42 +0900
Subject: feat(client): remove registration page

---
 src/client/stores/auth.test.tsx | 46 -----------------------------------------
 1 file changed, 46 deletions(-)

(limited to 'src/client/stores/auth.test.tsx')

diff --git a/src/client/stores/auth.test.tsx b/src/client/stores/auth.test.tsx
index ab6b554..72ab9e3 100644
--- a/src/client/stores/auth.test.tsx
+++ b/src/client/stores/auth.test.tsx
@@ -11,7 +11,6 @@ import { AuthProvider, useAuth } from "./auth";
 vi.mock("../api/client", () => ({
 	apiClient: {
 		login: vi.fn(),
-		register: vi.fn(),
 		logout: vi.fn(),
 		isAuthenticated: vi.fn(),
 		getTokens: vi.fn(),
@@ -124,51 +123,6 @@ describe("useAuth", () => {
 		});
 	});
 
-	describe("register", () => {
-		it("registers and logs in automatically", async () => {
-			const mockUser = { id: "user-1", username: "newuser" };
-			vi.mocked(apiClient.register).mockResolvedValue({ user: mockUser });
-			vi.mocked(apiClient.login).mockResolvedValue({
-				accessToken: "access-token",
-				refreshToken: "refresh-token",
-				user: mockUser,
-			});
-			vi.mocked(apiClient.isAuthenticated).mockReturnValue(true);
-
-			const { result } = renderHook(() => useAuth(), { wrapper });
-
-			await waitFor(() => {
-				expect(result.current.isLoading).toBe(false);
-			});
-
-			await act(async () => {
-				await result.current.register("newuser", "password123");
-			});
-
-			expect(apiClient.register).toHaveBeenCalledWith("newuser", "password123");
-			expect(apiClient.login).toHaveBeenCalledWith("newuser", "password123");
-			expect(result.current.user).toEqual(mockUser);
-		});
-
-		it("propagates registration errors", async () => {
-			vi.mocked(apiClient.register).mockRejectedValue(
-				new Error("Username taken"),
-			);
-
-			const { result } = renderHook(() => useAuth(), { wrapper });
-
-			await waitFor(() => {
-				expect(result.current.isLoading).toBe(false);
-			});
-
-			await expect(
-				act(async () => {
-					await result.current.register("existinguser", "password123");
-				}),
-			).rejects.toThrow("Username taken");
-		});
-	});
-
 	describe("logout", () => {
 		it("logs out and clears user", async () => {
 			const mockUser = { id: "user-1", username: "testuser" };
-- 
cgit v1.2.3-70-g09d2

