From 9e6c97e532ef9970fc975123abaca86c4ce9b6b1 Mon Sep 17 00:00:00 2001 From: Michael Hunteman Date: Sat, 31 Aug 2024 16:09:58 -0700 Subject: Update type names --- server/test/guest_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'server/test') diff --git a/server/test/guest_test.go b/server/test/guest_test.go index 4609d57..a5e8e8d 100644 --- a/server/test/guest_test.go +++ b/server/test/guest_test.go @@ -63,7 +63,7 @@ func TestUpdateRSVP(test *testing.T) { deleteGuest(guestHandler, adminToken, test) } -func logInGuest(guestHandler *guest.GuestHandler, test *testing.T) guest.LoginResponse { +func logInGuest(guestHandler *guest.GuestHandler, test *testing.T) guest.Login { response := httptest.NewRecorder() loginRequest, err := http.NewRequest(http.MethodPost, "http://localhost:8080/guests/login", strings.NewReader(getName())) @@ -72,7 +72,7 @@ func logInGuest(guestHandler *guest.GuestHandler, test *testing.T) guest.LoginRe } guestHandler.ServeHTTP(response, loginRequest) assertEquals(test, response.Result().StatusCode, 200) - var login guest.LoginResponse + var login guest.Login if err = json.NewDecoder(response.Body).Decode(&login); err != nil { log.Fatal(err) } @@ -91,7 +91,7 @@ func addPartyMember(guestHandler *guest.GuestHandler, token string, test *testin assertEquals(test, response.Result().StatusCode, 200) } -func logInAdmin(adminHandler *admin.AdminHandler, test *testing.T) admin.LoginResponse { +func logInAdmin(adminHandler *admin.AdminHandler, test *testing.T) admin.Login { response := httptest.NewRecorder() loginRequest, err := http.NewRequest(http.MethodPost, "http://localhost:8080/admin/login", strings.NewReader(getCredentials())) @@ -100,7 +100,7 @@ func logInAdmin(adminHandler *admin.AdminHandler, test *testing.T) admin.LoginRe } adminHandler.ServeHTTP(response, loginRequest) assertEquals(test, response.Result().StatusCode, 200) - var login admin.LoginResponse + var login admin.Login if err = json.NewDecoder(response.Body).Decode(&login); err != nil { log.Fatal(err) } -- cgit v1.2.3