Sha256: 8b655ef97a51f4d0b4a79a5d727f2b5c8df217446effb6a925525bafe037b856

Contents?: true

Size: 412 Bytes

Versions: 1

Compression:

Stored size: 412 Bytes

Contents

shared_examples "HTTP Basic Auth Required" do
  it "should not allow unauthorized access" do
    get action, action_params
    response.status.should eq(401)
  end

  it "should allow authorized access" do
    request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials("usertesting","usertesting")
    get action, action_params
    response.status.should eq(200)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
applicants-0.11.0 spec/shared/http_basic_auth_required.rb