Permalink
Browse files

Add test case for bugfix in 8513a7e.

  • Loading branch information...
1 parent 8513a7e commit 4040ae07e002b8457a49f1db108084aa012a1503 @jscheid jscheid committed Aug 5, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 websocket-test.el
View
@@ -360,7 +360,12 @@
(substring websocket-frames 0 2)))
(should open-callback-called)
(websocket-outer-filter fake-ws (substring websocket-frames 2))
- (should (equal (list frame2 frame1) processed-frames)))))
+ (should (equal (list frame2 frame1) processed-frames)))
+ (flet ((websocket-ready-state (websocket) 'connecting)
+ (websocket-close (websocket)))
+ (should (equal "Bad HTTP response code while opening websocket connection: 500"
+ (car (cdr (should-error
+ (websocket-outer-filter fake-ws "HTTP/1.1 500\r\n\r\n")))))))))
(ert-deftest websocket-outer-filter-bad-connection ()
(let* ((on-open-calledp)

0 comments on commit 4040ae0

Please sign in to comment.