Browse files

Added missing spec which just verifies that we're able to set the

user agent on Typhoeus::Easy instances.
  • Loading branch information...
1 parent 7aebf71 commit 458477d0c35a995a99b355c5ebd9254c8d002973 @smulube smulube committed Nov 16, 2009
Showing with 10 additions and 0 deletions.
  1. +10 −0 spec/typhoeus/easy_spec.rb
View
10 spec/typhoeus/easy_spec.rb
@@ -20,6 +20,16 @@
JSON.parse(e.response_body)["REQUEST_METHOD"].should == "GET"
end
+ it "should allow you to set the user agent" do
+ easy = Typhoeus::Easy.new
+ easy.url = "http://localhost:3002"
+ easy.method = :get
+ easy.user_agent = "myapp"
+ easy.perform
+ easy.response_code.should == 200
+ JSON.parse(easy.response_body)["HTTP_USER_AGENT"].should == "myapp"
+ end
+
it "should provide a timeout in milliseconds" do
e = Typhoeus::Easy.new
e.url = "http://localhost:3001"

0 comments on commit 458477d

Please sign in to comment.