diff options
Diffstat (limited to 'server/test')
-rw-r--r-- | server/test/guest_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
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) } |