# Copyright (c) 2014 Perforce Software, Inc. All rights reserved. require 'rspec' require 'p4_web_api_client' require_relative 'test_connections' RSpec.describe P4WebApiClient::Client, '#changes' do it 'should list change 1' do client_as_jdoe do |c| changes = c.changes expect(changes.length).to be >= 1 expect(changes.map(&:change)).to include('1') end end end RSpec.describe P4WebApiClient::Client, '#change' do it 'should describe two files in change 1' do client_as_jdoe do |c| change = c.change('1') expect(change.files.length).to eq(2) end end end RSpec.describe P4WebApiClient::Client, '#create_change' do it 'should allow us to integrate //depot/dev/Experimental to '\ '//depot/main/Experimental' do client_as_jdoe do |c| c.create_change( 'files' => [ { 'depot_file' => '//depot/main/Experimental/...', 'from_depot_file' => '//depot/dev/Experimental/...', 'action' => 'branch' } ] ) files = c.files('//depot/main/Experimental') expect(files.length).to eq(1) expect(files.first.name).to eq('README') end end it 'should allow us to upload two files to //depot/dev/Experimental' do client_as_jdoe do |c| c.create_change( 'description' => 'Upload two experimental files', 'files' => [ { 'depot_file' => '//depot/dev/Experimental/teapot1.txt', 'action' => 'upload', 'content' => "I'm a little teapot" }, { 'depot_file' => '//depot/dev/Experimental/teapot2.txt', 'action' => 'upload', 'content' => 'Short and stout!' } ] ) files = c.files('//depot/dev/Experimental') names = files.map(&:name) expect(names).to include('teapot1.txt') expect(names).to include('teapot2.txt') end end end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#3 | 13972 | tjuricek |
Removing old microservice implementations. The system is now mostly a monolith. Eventually there will be a websocket service. |
||
#2 | 13474 | tjuricek | Corrected regressions that broke the API and Project services specs. | ||
#1 | 13412 | tjuricek |
Initial version of the web-services mainline. This is a collection of several projects, that will likely often get released together, though many of them may not always be relevant. See the README for more information. |