aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2015-08-06 00:45:01 +0900
committerKazuki Yamaguchi <k@rhe.jp>2015-08-06 00:45:01 +0900
commitd65269f283064b821fbc3759cd431e4bec94f096 (patch)
treec4adf0866dad96779824ceeba0dd820cb9486b7d /test
parentc651e91bebbd377caa04fa44c576798f1a12076d (diff)
downloadplum-d65269f283064b821fbc3759cd431e4bec94f096.tar.gz
test: stream: add test case for PRIORITY frame
Diffstat (limited to 'test')
-rw-r--r--test/plum/stream/test_handle_frame.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/plum/stream/test_handle_frame.rb b/test/plum/stream/test_handle_frame.rb
index 2daa354..6ffd666 100644
--- a/test/plum/stream/test_handle_frame.rb
+++ b/test/plum/stream/test_handle_frame.rb
@@ -173,4 +173,21 @@ class StreamHandleFrameTest < Minitest::Test
assert_equal([[":path", "/"]], headers)
}
end
+
+ ## PRIORITY
+ def test_stream_handle_priority
+ open_server_connection {|con|
+ parent = open_new_stream(con)
+ stream = open_new_stream(con)
+
+ payload = "".push_uint32((1 << 31) | parent.id)
+ .push_uint8(50)
+ stream.process_frame(Frame.new(type: :priority,
+ stream_id: stream.id,
+ payload: payload))
+ assert_equal(true, stream.exclusive)
+ assert_equal(parent, stream.parent)
+ assert_equal(50, stream.weight)
+ }
+ end
end