add auth store test

This commit is contained in:
Kanezoh 2021-12-29 17:23:42 +09:00
parent d54a93a64a
commit c3e8c15c6b

View File

@ -0,0 +1,13 @@
require "./spec_helper"
describe "Mechanize AuthStore test" do
it "add_auth" do
auth_store = Mechanize::HTTP::AuthStore.new
url = URI.parse("http://example.com/")
user = "kanezoh"
password = "password"
auth_store.add_auth(url, user, password)
auth_store.auth_accounts.size.should eq 1
auth_store.auth_accounts[url].should eq({"kanezoh", "password"})
end
end