add simple get test

master
Kanezoh 2021-06-09 21:44:54 +09:00
parent bd6160b445
commit dc11231a4d
1 changed files with 6 additions and 6 deletions

View File

@ -3,11 +3,11 @@ require "webmock"
WebMock.stub(:any, "example.com") WebMock.stub(:any, "example.com")
describe Mechanize do describe Mechanize do
# TODO: Write tests it "simple get" do
agent = Mechanize.new
it "works" do uri = "http://example.com/"
response = HTTP::Client.get("http://example.com") page = agent.get(uri)
response.body.should eq "" page.code.should eq 200
response.status_code.should eq 200 page.uri.to_s.should eq uri
end end
end end