capybara-mechanize icon indicating copy to clipboard operation
capybara-mechanize copied to clipboard

Support for capturing exceptions / HTTP 401

Open chalmagean opened this issue 12 years ago • 5 comments

Hello,

Is there any way to test for a HTTP 401 ? I'd like to have a test for making sure HTTP auth is in place on a remote site. Right now capybara-mechanize throws an exception and aborts.

I think this pull req is related:

Pull Request #15

Thanks

chalmagean avatar Feb 14 '13 20:02 chalmagean

@mixandgo, if you'd like to contribute a patch in a pull request, I'm more than happy to merge. True, that doesn't sound like expected behavior though.

phillbaker avatar Mar 07 '13 01:03 phillbaker

With my PR #54 you can do rescue Mechanize::UnauthorizedError

aaronchi avatar Jun 26 '13 23:06 aaronchi

@aaronchi, this sounds like a good test case to add (as well as fixing the current failing test), I'd appreciate it!

phillbaker avatar Jun 27 '13 00:06 phillbaker

Yah. I realized that there was a test after I committed this. I'll update the PR to address it.

aaronchi avatar Jun 27 '13 00:06 aaronchi

@aaronchi - any luck on updating that PR?

phillbaker avatar Aug 29 '13 00:08 phillbaker