summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-06-23 14:13:17 +0000
committerRémy Coutable <remy@rymai.me>2016-06-23 14:13:17 +0000
commit6f6dcc366b0d74a8d9f4e29005af23ed2a31c33c (patch)
tree80b70f1bfd3aecf19e35cb9a795bae5e0a8c0a9d /spec/lib
parent3eab71f930f5baf72b27f46a04f84ce6a9838c21 (diff)
parent79192a8437ddd2c909c01e024bdf0bb7a2212265 (diff)
downloadgitlab-ce-6f6dcc366b0d74a8d9f4e29005af23ed2a31c33c.tar.gz
Merge branch 'fix/import-export-gitlab-errors' into 'master'
Fix errors found on importing GitLab CE repo Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/18968 See merge request !4855
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/import_export/project.json23
-rw-r--r--spec/lib/gitlab/import_export/project_tree_restorer_spec.rb6
2 files changed, 29 insertions, 0 deletions
diff --git a/spec/lib/gitlab/import_export/project.json b/spec/lib/gitlab/import_export/project.json
index 400d44ac162..403bd582ef3 100644
--- a/spec/lib/gitlab/import_export/project.json
+++ b/spec/lib/gitlab/import_export/project.json
@@ -4894,6 +4894,29 @@
"started_at": null,
"finished_at": null,
"duration": null,
+ "notes": [
+ {
+ "id": 999,
+ "note": "Natus rerum qui dolorem dolorum voluptas.",
+ "noteable_type": "Commit",
+ "author_id": 1,
+ "created_at": "2016-03-22T15:19:59.469Z",
+ "updated_at": "2016-03-22T15:19:59.469Z",
+ "project_id": 5,
+ "attachment": {
+ "url": null
+ },
+ "line_code": null,
+ "commit_id": "be93687618e4b132087f430a4d8fc3a609c9b77c",
+ "noteable_id": 36,
+ "system": false,
+ "st_diff": null,
+ "updated_by_id": null,
+ "author": {
+ "name": "Administrator"
+ }
+ }
+ ],
"statuses": [
{
"id": 71,
diff --git a/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb b/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
index 7a40a43f8ae..23036ab8108 100644
--- a/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
+++ b/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
@@ -18,6 +18,12 @@ describe Gitlab::ImportExport::ProjectTreeRestorer, services: true do
it 'restores models based on JSON' do
expect(restored_project_json).to be true
end
+
+ it 'creates a valid pipeline note' do
+ restored_project_json
+
+ expect(Ci::Pipeline.first.notes).not_to be_empty
+ end
end
end
end