summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorAlex Lossent <alexandre.lossent@cern.ch>2018-09-27 18:17:20 +0200
committerAlex Lossent <alexandre.lossent@cern.ch>2018-10-19 10:22:55 +0200
commit60937adacb0242d561616660360fad4cd54614c1 (patch)
tree8c85133e0d1422509a02e2910ada12a5f2f467ea /spec
parentd76c647797ac7fe55f6f98b4acc1f8f061368e5e (diff)
downloadgitlab-ce-60937adacb0242d561616660360fad4cd54614c1.tar.gz
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')
-rw-r--r--spec/models/project_services/bamboo_service_spec.rb3
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