add auth store test
This commit is contained in:
parent
d54a93a64a
commit
c3e8c15c6b
13
spec/http_auth_store_spec.cr
Normal file
13
spec/http_auth_store_spec.cr
Normal 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
|
Loading…
Reference in New Issue
Block a user