summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/import_export/project_tree_saver_spec.rb
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2018-01-17 11:52:35 +0100
committerPawel Chojnacki <pawel@chojnacki.ws>2018-01-17 11:52:35 +0100
commitb0d784a4e7678217c3f1a7e771b3946fe6df5ec6 (patch)
treec3b147233efeef43a47ea5f63e7d5e0bb9d13941 /spec/lib/gitlab/import_export/project_tree_saver_spec.rb
parent1c7a61afd20b581167c76b69f0a303fcb25cd87d (diff)
parentad5ce890488edb136bb193eff0ffb9513d4a6798 (diff)
downloadgitlab-ce-b0d784a4e7678217c3f1a7e771b3946fe6df5ec6.tar.gz
Merge remote-tracking branch 'upstream/master' into pawel/connect_to_prometheus_through_proxy-30480
Diffstat (limited to 'spec/lib/gitlab/import_export/project_tree_saver_spec.rb')
-rw-r--r--spec/lib/gitlab/import_export/project_tree_saver_spec.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/lib/gitlab/import_export/project_tree_saver_spec.rb b/spec/lib/gitlab/import_export/project_tree_saver_spec.rb
index 6faf3d82981..08e5bbbd400 100644
--- a/spec/lib/gitlab/import_export/project_tree_saver_spec.rb
+++ b/spec/lib/gitlab/import_export/project_tree_saver_spec.rb
@@ -109,12 +109,20 @@ describe Gitlab::ImportExport::ProjectTreeSaver do
expect(saved_project_json['merge_requests'].first['notes'].first['author']).not_to be_empty
end
+ it 'has pipeline stages' do
+ expect(saved_project_json.dig('pipelines', 0, 'stages')).not_to be_empty
+ end
+
it 'has pipeline statuses' do
- expect(saved_project_json['pipelines'].first['statuses']).not_to be_empty
+ expect(saved_project_json.dig('pipelines', 0, 'stages', 0, 'statuses')).not_to be_empty
end
it 'has pipeline builds' do
- expect(saved_project_json['pipelines'].first['statuses'].count { |hash| hash['type'] == 'Ci::Build' }).to eq(1)
+ builds_count = saved_project_json
+ .dig('pipelines', 0, 'stages', 0, 'statuses')
+ .count { |hash| hash['type'] == 'Ci::Build' }
+
+ expect(builds_count).to eq(1)
end
it 'has no when YML attributes but only the DB column' do