# Copyright (c) 2014 Perforce Software, Inc. All rights reserved. require_relative './test_config' require 'helix_web_services_client' RSpec.describe 'HelixWebServicesClient groups' do randstr = (0...8).map { (65 + rand(26)).chr }.join group_id = "test_#{randstr}" new_group = { 'Group' => group_id, 'Users' => ['jdoe'] } context '#create_group' do it 'should create a new group - and return it via #groups' do client_as_super do |c| c.create_group(new_group) groups = c.groups expect(groups.map(&:group)).to include(group_id) end end end context '#group' do it 'should load a single group created via #create_group' do client_as_jdoe do |c| jarjar = c.group(group_id) expect(jarjar.users).to include('jdoe') end end end context '#update_group' do it 'should be able to add a group user' do client_as_super do |c| group = c.group(group_id) group.users << 'super' c.update_group(group) loaded = c.group(group_id) expect(loaded.users).to include('super') end end end context '#delete_group' do it 'should be able to delete a group created via #create_group' do client_as_super do |c| c.delete_group(group_id) groups = c.groups expect(groups.map(&:group)).to_not include(group_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/groups_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/groups_spec.rb | |||||
#1 | 15209 | tjuricek | Implement tests and documentation for group spec management. | ||
//guest/perforce_software/helix-web-services/main/helix_web_services_client/spec.old/perforce/groups_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/groups_spec.rb | |||||
#1 | 13808 | tjuricek | Finish converting most of the core p4d API into the new monolithic system. |