diff --git a/util_test.go b/util_test.go index f14d69a..032876c 100644 --- a/util_test.go +++ b/util_test.go @@ -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) + } +}