8000 fix(site): prevent ExtractAPIKey from dirtying the HTML output by mafredri · Pull Request #8450 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

fix(site): prevent ExtractAPIKey from dirtying the HTML output #8450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
s/require/assert/ to give more context
  • Loading branch information
mafredri committed Jul 12, 2023
commit b70084d2165bdbfc35a522b4572df2673812db7b
4 changes: 2 additions & 2 deletions site/site_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ func TestInjectionFailureProducesCleanHTML(t *testing.T) {

// Ensure we get a clean HTML response with no user data or errors
// from httpmw.ExtractAPIKey.
require.Equal(t, http.StatusOK, rw.Code)
assert.Equal(t, http.StatusOK, rw.Code)
body := rw.Body.String()
require.Equal(t, "<html></html>", body)
assert.Equal(t, "<html></html>", body)
}

func TestCaching(t *testing.T) {
Expand Down
0