File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 12
12
13
13
with '#hijack' do
14
14
let ( :response_version ) { Protocol ::HTTP1 ::Connection ::HTTP10 }
15
- let ( :response_headers ) { Hash . new ( 'upgrade' => 'websocket' ) }
16
15
let ( :body ) { Protocol ::HTTP ::Body ::Buffered . new }
17
16
let ( :text ) { "Hello World!" }
18
17
34
33
expect ( body ) . to receive ( :each ) . and_return ( nil )
35
34
36
35
expect ( server ) . to receive ( :write_body_and_close )
37
- server . write_response ( response_version , 101 , response_headers )
36
+ server . write_response ( response_version , 101 , { 'upgrade' => 'websocket' } )
38
37
server . write_body ( response_version , body )
39
38
40
39
server_stream = server . hijack!
43
42
44
43
expect ( version ) . to be == response_version
45
44
expect ( status ) . to be == 101
46
- expect ( headers ) . to be == response_headers
45
+ expect ( headers ) . to have_keys (
46
+ 'upgrade' => be == [ 'websocket' ] ,
47
+ )
47
48
expect ( body ) . to be_nil # due to 101 status
48
49
49
50
client_stream = client . hijack!
You can’t perform that action at this time.
0 commit comments