# Copyright (c) 2014-2015 Perforce Software, Inc. All rights reserved. require 'rspec' require 'helix_web_services_client' require_relative './test_config' RSpec.describe 'HelixWebServicesClient depots' do randstr = (0...8).map { (65 + rand(26)).chr }.join depot_id = "test_#{randstr}" new_depot = { 'Depot' => depot_id, 'Description' => "Test Depot #{randstr}", 'Type' => 'local', 'Map' => "#{depot_id}/..." } context '#create_depot' do it 'should create a new depot - and return it via #depots' do client_as_super do |c| c.create_depot(new_depot) depots = c.depots expect(depots.map(&:name_or_depot)).to include(depot_id) end end end context '#depot' do it 'should load a single depot created via #create_depot' do client_as_jdoe do |c| new_depot = c.depot(depot_id) expect(new_depot.description).to include(new_depot['Description']) end end end context '#update_depot' do it "'should be able to update the depot description'" do client_as_super do |c| new_depot = c.depot(depot_id) new_depot.description = "Updated #{randstr}" c.update_depot(new_depot) loaded = c.depot(depot_id) expect(loaded.description).to include("Updated #{randstr}") end end end context '#delete_depot' do it "'should be able to delete a depot created via #create_depot'" do client_as_super do |c| c.delete_depot(depot_id) depots = c.depots expect(depots.map(&:depot)).to_not include(depot_id) end end end end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 15688 | Doug Scheirer |
Populate -o //guest/perforce_software/helix-web-services/... //guest/doug_scheirer/helix-web-services/.... |
||
//guest/perforce_software/helix-web-services/main/source/helix_web_services_client/spec/depots_spec.rb | |||||
#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_client/spec/depots_spec.rb | |||||
#1 | 15205 | tjuricek | Implemented tests and documentation for depot spec editing. | ||
//guest/perforce_software/helix-web-services/main/helix_web_services_client/spec.old/perforce/depots_spec.rb | |||||
#1 | 15053 | tjuricek |
Revise the client API to use the new login method. The current specs will need to be revised since data normalization is moving out of the server and into the client. |
||
//guest/perforce_software/helix-web-services/main/helix_web_services_client/spec/perforce/depots_spec.rb | |||||
#1 | 13808 | tjuricek | Finish converting most of the core p4d API into the new monolithic system. |