# Copyright (c) 2014 Perforce Software, Inc. All rights reserved. require 'rspec' require 'p4_web_api_client' require_relative 'test_connections' RSpec.describe P4WebApiClient::Client, '#create_label' do it 'should create a new label - and return it via #labels' do client_as_jdoe do |c| new_label = P4WebApiClient::Models::Label.new new_label.label = 'new_label' new_label.description = 'A label' new_label.view = ['//depot/...'] c.create_label(new_label) labels = c.labels expect(labels.map(&:label)).to include('new_label') end end end RSpec.describe P4WebApiClient::Client, '#label' do it 'should load a single label created via #create_label' do client_as_jdoe do |c| new_label = c.label('new_label') expect(new_label.description.strip).to eq('A label') expect(new_label.view.first).to eq('//depot/...') end end end RSpec.describe P4WebApiClient::Client, '#update_label' do it "'should be able to update the label description'" do client_as_jdoe do |c| new_label = c.label('new_label') new_label.description = 'updated' c.update_label(new_label) loaded = c.label('new_label') expect(loaded.description.strip).to eq('updated') end end end RSpec.describe P4WebApiClient::Client, '#delete_label' do it "'should be able to delete a label created via #create_label'" do client_as_jdoe do |c| c.delete_label('new_label') labels = c.labels expect(labels.map(&:label)).to_not include('new_label') 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. |