File: error.rb

package info (click to toggle)
ruby-protocol-http2 0.23.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 472 kB
  • sloc: ruby: 3,627; makefile: 4
file content (18 lines) | stat: -rw-r--r-- 431 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2023-2024, by Samuel Williams.

require "protocol/http2/error"

describe Protocol::HTTP2::HeaderError do
	let(:error) {subject.new("Invalid header key")}
	
	it "should have a message" do
		expect(error.message).to be == "Invalid header key"
	end
	
	it "should be a kind of StreamClosed" do
		expect(error).to be_a Protocol::HTTP2::StreamClosed
	end
end