diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2015-11-03 19:44:06 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2015-11-03 19:44:06 +0900 |
commit | 2e9abcb889e625ad1dab8f37fc20b12dfcd6d3fc (patch) | |
tree | 78bf462bf025a89fc9c76ef67b4ced4d4d0f6f62 | |
parent | 9e5c7c3d4fa100574e7f77c06998859ef0deb389 (diff) | |
download | plum-2e9abcb889e625ad1dab8f37fc20b12dfcd6d3fc.tar.gz |
connection_utils: add test for #push_enabled?
-rw-r--r-- | test/plum/test_connection_utils.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/plum/test_connection_utils.rb b/test/plum/test_connection_utils.rb index faa8782..0051117 100644 --- a/test/plum/test_connection_utils.rb +++ b/test/plum/test_connection_utils.rb @@ -26,4 +26,13 @@ class ServerConnectionUtilsTest < Minitest::Test assert_equal(HTTPError::ERROR_CODES[:stream_closed], last.payload.uint32(4)) } end + + def test_push_enabled + open_server_connection {|con| + con << Frame.settings(enable_push: 0).assemble + assert_equal(false, con.push_enabled?) + con << Frame.settings(enable_push: 1).assemble + assert_equal(true, con.push_enabled?) + } + end end |