Skip to content

Commit

Permalink
chore: Add test for modifying request
Browse files Browse the repository at this point in the history
  • Loading branch information
route committed Feb 28, 2024
1 parent 8ba95cd commit 5271866
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/network/exchange_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@
expect(last_exchange.intercepted_request).to be
expect(last_exchange.intercepted_request).to be_a(Ferrum::Network::InterceptedRequest)
end

it "modifies request" do
network.intercept
page.on(:request) { |r, _, _| r.continue(url: base_url("/foo")) }

page.go_to

expect(page.body).to include("Another World")
expect(last_exchange.intercepted_request).to be
expect(last_exchange.intercepted_request).to be_a(Ferrum::Network::InterceptedRequest)
end
end

describe "#request" do
Expand Down

0 comments on commit 5271866

Please sign in to comment.