require_relative '../test_config' require 'hws_settings' require 'auth' class TestApp < Sinatra::Base use HWSSettings use Auth::Middleware get '/test' do 'ok' end end describe Auth::Middleware do include Rack::Test::Methods def app TestApp end it 'should allow for valid ticket authentication' do authorize 'jdoe', ticket_for_jdoe get '/test' expect(last_response.status).to eq(200) expect(last_response.body).to eq('ok') end it 'should return a 403 for invalid ticket authentication' do authorize 'jdoe', 'invalid' get '/test' expect(last_response.status).to eq(403) end end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#3 | 17271 | tjuricek | Remove deprecated Ruby implementation. | ||
#2 | 16072 | tjuricek |
Helix Cloud integration for Helix Sync services. This includes a "mock_raymond" rails application for keeping tabs on basic integration with Helix Cloud. We do not test against a live server. See integration history for more details. |
||
#1 | 15622 | tjuricek |
Move source code to 'source/' subdirectory of branch. build/ will remain where it is. |
||
//guest/perforce_software/helix-web-services/main/helix_web_services/spec/auth/middleware_spec.rb | |||||
#1 | 15073 | tjuricek | Update Auth::Middleware and add spec |