-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Do not expect response for initiatorType Ping requests (#417)
* Add Request#response_expected? method * Add Exchange#response_expected? method * Exchange#finished? returns true if no response expected * Add HTML test for <a> with ping attribute
- Loading branch information
1 parent
ec912a1
commit b5a5ae8
Showing
8 changed files
with
95 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
describe Ferrum::Network::Request do | ||
skip | ||
describe "#response_expected?" do | ||
it "returns true for document requests" do | ||
request = Ferrum::Network::Request.new({"type" => "Document"}) | ||
|
||
expect(request.response_expected?).to be(true) | ||
end | ||
|
||
it "returns false for ping requests" do | ||
request = Ferrum::Network::Request.new({"type" => "Ping"}) | ||
|
||
expect(request.response_expected?).to be(false) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<p> | ||
<a href="/host" ping="/ferrum/ping">Link with ping</a> | ||
</p> |