Skip to content

Commit

Permalink
Add spec for Context#dup.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Mar 10, 2024
1 parent 643ec5b commit bb08dc3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/protocol/hpack/context_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@
it 'should be initialized with empty headers' do
expect(context.table).to be_empty
end

context '#dup' do
it "duplicates mutable table state" do
context.instance_eval do
add_to_table(['test1', '1'])
add_to_table(['test2', '2'])
end

dup = context.dup
expect(dup.table).to eq context.table
expect(dup.table).not_to be context.table
end
end

context 'processing' do
[
Expand Down

0 comments on commit bb08dc3

Please sign in to comment.