Skip to content

Commit bbdd048

Browse files
committed
test: add test cases for domain concealment in auth error messages
- Verifies the error message no longer shows domain list - Adds tests for both invalid domain and malformed email cases - Includes test for successful login with allowed domain - Fixes response body closing in test
1 parent 75bb4cd commit bbdd048

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

coderd/domain_error_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ func TestOIDCDomainErrorMessage(t *testing.T) {
111111
}
112112

113113
// Attempt login and expect success
114-
client, _ := fake.Login(t, server, claims)
114+
client, resp := fake.Login(t, server, claims)
115+
defer resp.Body.Close()
115116

116117
// Verify the user was created correctly
117118
user, err := client.User(context.Background(), "me")

0 commit comments

Comments
 (0)