$:.push File.expand_path("../../lib", __FILE__) require 'helix_web_services_client' require_relative './util/test_config' require_relative './util/string_utils' require 'pp' api = api_as_jdoe rand = random_string branch_id = "test-branch-#{random_string}" branch_command = HelixWebServices::BranchCommand.new( branch: branch_id, view: [ "//depot/main/#{branch_id}/... //depot/dev/#{branch_id}/..." ] ) sent_error = false begin api.server_branches_post('illegal', branch_command) rescue sent_error = true end raise 'No error was raised with an illegal Server ID' unless sent_error