# Copyright (c) 2015 Perforce Software, Inc. All rights reserved. require 'rspec' require 'helix_web_services_client' require_relative './test_config' RSpec.describe HelixWebServicesClient do context '#initialize' do it 'should login to a web services instance' do created = false client_as_jdoe do |c| created = true end expect(created).to be(true) end it 'should throw an unauthenticated error with the wrong login during init' do expect { HelixWebServicesClient.new( url: WS_URL, user: 'jdoe', password: 'totally_invalid', ssl: {verify: false} ) }.to raise_error(Errors::Unauthenticated) end end end