File: challenge.rb

package info (click to toggle)
ruby-rack-test 0.7.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 296 kB
  • sloc: ruby: 1,900; makefile: 5
file content (11 lines) | stat: -rw-r--r-- 268 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
RSpec::Matchers.define :be_challenge do
  match do |actual_response|
    actual_response.status == 401 &&
    actual_response['WWW-Authenticate'] =~ /^Digest / &&
    actual_response.body.empty?
  end

  description do
    "a HTTP Digest challenge response"
  end
end