I'm using HTTParty to test a REST service. It works great except when I actually test the: valid-login, valid-user-bad-pass, bad-user-valid-pass flow. The "wrong password" test actually fails because it successfully authenticates even though I'm passing an invalid password in the {:basic_auth => ...} Hash. I suspect the HTTParty PUT method is "remembering" the valid credential and somehow offering it... perhaps in a cookie.
Does anyone know how to clear out the cookies (instance and/or class)? Or has anyone else observed this behavior?
I've read the source code and couldn't figure out how to access @default_cookies
I also used the static initializer
class MyParty
include HTTParty
cookies {}
...
end
but to no avail.
Thanks!
Ben