require_relative '../test_config' require 'hws_settings' require 'projects' require 'base64' require 'hws_strings' describe 'Projects' do include Rack::Test::Methods def app HELIX_WEB_SERVICES_APP end my_project_id = HWSStrings.component_encode('My Project') after(:each) do HWSSettings.settings_handle.HVE_PROJECTS_PATH = nil end context 'GET /projects/v1' do context 'HVE Projects' do it 'will list project ids with no details value' do HWSSettings.settings_handle.HVE_PROJECTS_PATH = '//depot/main' authorize 'jdoe', ticket_for_jdoe get('/projects/v1') expect(last_response.status).to eq(200) ids = JSON.parse(last_response.body) expect(ids).to include(my_project_id) end it 'will list project data with details enabled' do HWSSettings.settings_handle.HVE_PROJECTS_PATH = '//depot/main' authorize 'jdoe', ticket_for_jdoe get('/projects/v1?details=true') expect(last_response.status).to eq(200) projects = JSON.parse(last_response.body) my_project = projects.find {|p| p['id'] == my_project_id } expect(my_project).to_not be_nil expect(my_project['name']).to eq('My Project') expect(my_project['server']).to_not be_nil expect(my_project['hveProject']['depotPath']).to eq('//depot/main/My Project') end end end context 'GET /projects/v1/:id' do context 'HVE Projects' do it 'will list project data for the indicated id' do HWSSettings.settings_handle.HVE_PROJECTS_PATH = '//depot/main' authorize 'jdoe', ticket_for_jdoe get("/projects/v1/#{my_project_id}") expect(last_response.status).to eq(200) my_project = JSON.parse(last_response.body) expect(my_project).to_not be_nil expect(my_project['id']).to eq(my_project_id) expect(my_project['name']).to eq('My Project') expect(my_project['server']).to_not be_nil expect(my_project['hveProject']['depotPath']).to eq('//depot/main/My Project') end end end end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#5 | 17271 | tjuricek | Remove deprecated Ruby implementation. | ||
#4 | 17114 | tjuricek |
Change p4d connection information just be fields on the main object. P4WEBAPI-158 |
||
#3 | 16094 | tjuricek |
Move /auth/v1/login -> /projects/v1/login The more generic login method is now /helix_versioning_engine/vAPI/login |
||
#2 | 16072 | tjuricek |
Helix Cloud integration for Helix Sync services. This includes a "mock_raymond" rails application for keeping tabs on basic integration with Helix Cloud. We do not test against a live server. See integration history for more details. |
||
#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/spec/projects/projects_spec.rb | |||||
#3 | 15542 | tjuricek |
Add spaces to our basic 'component encode' mechanism, and use it for HVE project IDs. In general, this will make the HVE IDs a bit more readable. |
||
#2 | 15479 | tjuricek | Added a basic "HVE project" implementation for creating clients. | ||
#1 | 15437 | tjuricek |
Basic "HVE Project" implementation. This will allow directories in a HVE instance to host 'projects' for use by helix sync. There are no methods defined for creating the projects, however. This does not include any specialization or testing in the Qt API yet. I may investigate creating a "higher level" interface for Qt client apps. |