improve frames coverage and fix a small stream frame parsing bug

ref #241
This commit is contained in:
Lucas Clemente
2016-08-02 13:11:30 +02:00
parent edc24ea795
commit b9abc5b2a1
11 changed files with 266 additions and 167 deletions

View File

@@ -16,6 +16,11 @@ var _ = Describe("PingFrame", func() {
Expect(err).ToNot(HaveOccurred())
Expect(b.Len()).To(Equal(0))
})
It("errors on EOFs", func() {
_, err := ParsePingFrame(bytes.NewReader(nil))
Expect(err).To(HaveOccurred())
})
})
Context("when writing", func() {