Skip to content

Commit

Permalink
roll back bad AI suggestion, fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
brianfeister committed Jan 8, 2025
1 parent eb9fd4e commit fb4b852
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions functions/gateway/templates/pages/profile_templ_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,7 @@ func TestProfilePage(t *testing.T) {
subdomain := "brians-pub"

// Call the ProfilePage function
userAbout := "I'm a software engineer passionate about technology."
profilePage := ProfilePage(mockUserInfo, mockRoleClaims, interests, subdomain, userAbout)

// Create a layout template
layoutTemplate := Layout(helpers.SitePages["profile"], mockUserInfo, profilePage, types.Event{})

// Check if the rendered content contains expected information
renderedContent := buf.String()
expectedContent := []string{
mockUserInfo.Email,
mockUserInfo.Name,
mockUserInfo.Sub,
mockUserInfo.Locale,
"Yes", // mockUserInfo.EmailVerified yields a value "Yes" or "No"
userAbout, // Verify that the about section is rendered
}
profilePage := ProfilePage(mockUserInfo, mockRoleClaims, interests, subdomain, "Test about me text")

// Create a layout template
layoutTemplate := Layout(helpers.SitePages["profile"], mockUserInfo, profilePage, types.Event{})
Expand All @@ -84,6 +69,7 @@ func TestProfilePage(t *testing.T) {
mockUserInfo.Sub,
mockUserInfo.Locale,
"Yes", // mockUserInfo.EmailVerified yields a value "Yes" or "No"
"Test about me text",
}

for _, element := range expectedContent {
Expand Down

0 comments on commit fb4b852

Please sign in to comment.