mirror of https://github.com/gorilla/websocket.git
Add test for computeAcceptKey
This commit is contained in:
parent
666c197fc9
commit
eb8de5f0b8
|
@ -113,3 +113,12 @@ func TestParseExtensions(t *testing.T) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestComputeAcceptKey(t *testing.T) {
|
||||
// Challenge and accept keys are from section 1.3 of the RFC.
|
||||
got := computeAcceptKey("dGhlIHNhbXBsZSBub25jZQ==")
|
||||
want := "s3pPLMBiTxaQ9kYGzzhZRbK+xOo="
|
||||
if got != want {
|
||||
t.Errorf("got %s, want %s", got, want)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue