require_relative '../test_config' require 'helix_versioning_engine' # Yes, this is a weird spec. I just want to make sure the code generally # runs for the Helix Sync "on premise" use case. describe 'HelixVersioningEngine login' do include Rack::Test::Methods def app HELIX_WEB_SERVICES_APP end context 'POST /p4/v78/login' do it 'can create ... the same ticket' do authorize 'jdoe', ticket_for_jdoe post('/p4/v78/login', {user: 'jdoe', password: JDOE_PASSWORD}) expect(last_response.status).to eq(200) ticket = JSON.parse(last_response.body)['ticket'] expect(ticket).to eq(p4ticket_for_jdoe) end end end