summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormicael.bergeron <micaelbergeron@gmail.com>2017-10-04 09:12:01 -0400
committermicael.bergeron <micaelbergeron@gmail.com>2017-10-04 09:12:01 -0400
commit09a733bac33195ef2693b17f1d3277dd26dc7777 (patch)
treebb6a1c7a2318681d8189ae08adb4d1aee614d89a
parentcf3de110c2320f3b944b40dc257199de28dab2e3 (diff)
downloadgitlab-ce-09a733bac33195ef2693b17f1d3277dd26dc7777.tar.gz
fix the spec so it fails before applying the fix
-rw-r--r--spec/lib/gitlab/import_export/project.light.json12
-rw-r--r--spec/lib/gitlab/import_export/project_tree_restorer_spec.rb8
2 files changed, 16 insertions, 4 deletions
diff --git a/spec/lib/gitlab/import_export/project.light.json b/spec/lib/gitlab/import_export/project.light.json
index 2d8f3d4a566..749fd868a81 100644
--- a/spec/lib/gitlab/import_export/project.light.json
+++ b/spec/lib/gitlab/import_export/project.light.json
@@ -63,6 +63,18 @@
"last_edited_at": null,
"last_edited_by_id": null,
"group_milestone_id": null,
+ "milestone": {
+ "id": 1,
+ "title": "test milestone",
+ "project_id": 8,
+ "description": "test milestone",
+ "due_date": null,
+ "created_at": "2016-06-14T15:02:04.415Z",
+ "updated_at": "2016-06-14T15:02:04.415Z",
+ "state": "active",
+ "iid": 1,
+ "group_id": null
+ },
"label_links": [
{
"id": 11,
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 efe11ca794a..eaaa9791d04 100644
--- a/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
+++ b/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
@@ -24,7 +24,7 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do
context 'JSON' do
it 'restores models based on JSON' do
- expect(@restored_project_json).to be true
+ expect(@restored_project_json).to be_truthy
end
it 'restore correct project features' do
@@ -203,7 +203,7 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do
restored_project_json
- expect(shared.errors.first).to be_nil
+ expect(shared.errors).to be_empty
end
end
end
@@ -212,7 +212,7 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do
it 'restores project json correctly' do
create(:ci_build, token: 'abcd')
- expect(restored_project_json).to be true
+ expect(restored_project_json).to be_truthy
end
end
@@ -233,8 +233,8 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do
end
it 'correctly restores project' do
- expect(restored_project_json).to be_truthy
expect(shared.errors).to be_empty
+ expect(restored_project_json).to be_truthy
end
it 'has labels' do