# Copyright (c) 2014 Perforce Software, Inc. All rights reserved. require 'rspec' require 'helix_web_services_client' require_relative './test_config' RSpec.describe 'HelixWebServicesClient streams' do rand_str = (0...8).map { (65 + rand(26)).chr }.join stream_name = "main-#{rand_str}" stream_path = "//stream-test/#{stream_name}" stream_def = { 'Stream' => stream_path, 'Name' => stream_name, 'Description' => "Test stream #{stream_name}", 'Type' => 'mainline', 'Parent' => 'none', 'Paths' => ['share ...'], 'Owner' => 'jdoe' } it 'should create a new stream - and return it via #streams' do client_as_jdoe do |c| c.create_stream(stream_def) streams = c.streams expect(streams.map(&:stream)).to include(stream_path) end end it 'should load a single stream created via #create_stream' do client_as_jdoe do |c| new_stream = c.stream(stream_path) expect(new_stream.description.strip).to eq(stream_def['Description']) expect(new_stream.name).to eq(stream_def['Name']) expect(new_stream.type).to eq(stream_def['Type']) end end it 'should be able to update the stream description' do client_as_jdoe do |c| c.update_stream({ 'Stream' => stream_path, 'Description' => 'updated' }) loaded = c.stream(stream_path) expect(loaded.description).to include('updated') end end it "'should be able to delete a stream created via #create_stream'" do client_as_jdoe do |c| c.delete_stream(stream_path) streams = c.streams expect(streams.map(&:stream)).to_not include(stream_path) 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/streams_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/streams_spec.rb | |||||
#1 | 15144 | tjuricek |
Setup stream spec tests and documentation. Also revised the documentation folder http_p4_web_api -> helix_versioning_engine |
||
//guest/perforce_software/helix-web-services/main/helix_web_services_client/spec.old/perforce/streams_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/streams_spec.rb | |||||
#2 | 13941 | tjuricek |
Re-implemented the sync project methods at the HTTP level. The Qt API is missing the "members" concept, but it's likely not quite usable just yet. It's existing logic does work, however. |
||
#1 | 13808 | tjuricek | Finish converting most of the core p4d API into the new monolithic system. |