diff options
author | Alex Lossent <alexandre.lossent@cern.ch> | 2018-09-27 19:17:20 +0300 |
---|---|---|
committer | Alex Lossent <alexandre.lossent@cern.ch> | 2018-10-19 11:22:55 +0300 |
commit | 60937adacb0242d561616660360fad4cd54614c1 (patch) | |
tree | 8c85133e0d1422509a02e2910ada12a5f2f467ea /spec/models/project_services | |
parent | d76c647797ac7fe55f6f98b4acc1f8f061368e5e (diff) |
Correctly process Bamboo API results
Bamboo API returns an array of results as per
https://docs.atlassian.com/atlassian-bamboo/REST/6.2.5/#d2e786
Diffstat (limited to 'spec/models/project_services')
-rw-r--r-- | spec/models/project_services/bamboo_service_spec.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/models/project_services/bamboo_service_spec.rb b/spec/models/project_services/bamboo_service_spec.rb index f4f7afb1b92..ee84fa95f0e 100644 --- a/spec/models/project_services/bamboo_service_spec.rb +++ b/spec/models/project_services/bamboo_service_spec.rb @@ -245,6 +245,7 @@ describe BambooService, :use_clean_rails_memory_store_caching do end def bamboo_response(result_key: 42, build_state: 'success', size: 1) - %Q({"results":{"results":{"size":"#{size}","result":{"buildState":"#{build_state}","planResultKey":{"key":"#{result_key}"}}}}}) + # reference: https://docs.atlassian.com/atlassian-bamboo/REST/6.2.5/#d2e786 + %Q({"results":{"results":{"size":"#{size}","result":[{"buildState":"#{build_state}","planResultKey":{"key":"#{result_key}"}}]}}}) end end |