# Copyright (c) 2014 Perforce Software, Inc. All rights reserved. require_relative './test_config' require 'helix_web_services_client' RSpec.describe 'HelixWebServicesClient labels' do randstr = (0...8).map { (65 + rand(26)).chr }.join label_id = "test_#{randstr}" new_label = { 'Label' => label_id, 'Description' => "test label #{label_id}", 'View' => ['//depot/...'] } context '#create_label' do it 'should create a new label - and return it via #labels' do skip 'Not available for cloud (no stream support)' if cloud_test? client_as_jdoe do |c| c.create_label(new_label) labels = c.labels expect(labels.map(&:label)).to include(label_id) end end end context '#label' do it 'should load a single label created via #create_label' do skip 'Not available for cloud (no stream support)' if cloud_test? client_as_jdoe do |c| new_label = c.label(label_id) expect(new_label.description).to include(new_label['Description']) expect(new_label.view.first).to eq('//depot/...') end end end context '#update_label' do it "'should be able to update the label description'" do client_as_jdoe do |c| new_label = c.label(label_id) new_label.description = "Update label #{label_id}" c.update_label(new_label) loaded = c.label(label_id) expect(loaded.description).to include("Update label #{label_id}") end end end context '#delete_label' do it "'should be able to delete a label created via #create_label'" do client_as_jdoe do |c| c.delete_label(label_id) labels = c.labels expect(labels.map(&:label)).to_not include(label_id) end end end end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 16271 | Doug Scheirer |
- delete the default //depot for cloud tests - mark more tests as pending - refactored sync tests a little to make cloud compatib;e - fixed a bug in the sync 'locked' logic |
||
#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/labels_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/labels_spec.rb | |||||
#1 | 15211 | tjuricek | Implement tests and documentation for label spec management. | ||
//guest/perforce_software/helix-web-services/main/helix_web_services_client/spec.old/perforce/labels_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/labels_spec.rb | |||||
#1 | 13808 | tjuricek | Finish converting most of the core p4d API into the new monolithic system. |