Commit 6f74c7d4 authored by James Lopez's avatar James Lopez

fix export commits stuff

parent 3b99e4ae
......@@ -12,8 +12,8 @@
- :merge_requests:
- :merge_request_diff
- :notes
- :commit_statuses:
- :commit
- :ci_commits:
- :statuses
:attributes_only:
:project:
......
......@@ -20,7 +20,7 @@ module Projects
File.write(full_path, project_json_tree)
true
rescue
#TODO: handle error
# TODO: handle error
false
end
......
......@@ -20,9 +20,10 @@ describe Projects::ImportExport::ProjectTreeSaver, services: true do
merge_requests: [merge_request],
labels: [label],
snippets: [snippet],
releases: [release],
commit_statuses: [commit_status])
releases: [release]
)
end
let!(:ci_commit) { create(:ci_commit, project: project, sha: merge_request.last_commit.id, ref: merge_request.source_branch, statuses: [commit_status]) }
let!(:milestone) { create(:milestone, title: "Milestone v1.2", project: project) }
let(:export_path) { "#{Dir::tmpdir}/project_tree_saver_spec" }
let(:shared) { Projects::ImportExport::Shared.new(relative_path: project.path_with_namespace) }
......@@ -86,10 +87,6 @@ describe Projects::ImportExport::ProjectTreeSaver, services: true do
expect(saved_project_json['issues'].first['notes']).not_to be_empty
end
it 'has commit statuses' do
expect(saved_project_json['commit_statuses']).not_to be_empty
end
it 'has project members' do
expect(saved_project_json['project_members']).not_to be_empty
end
......@@ -102,8 +99,12 @@ describe Projects::ImportExport::ProjectTreeSaver, services: true do
expect(saved_project_json['merge_requests'].first['notes']).not_to be_empty
end
it 'has commit statuses' do
expect(saved_project_json['ci_commits'].first['statuses']).not_to be_empty
end
it 'has ci commits' do
expect(saved_project_json['commit_statuses'].first['commit']).not_to be_empty
expect(saved_project_json['ci_commits']).not_to be_empty
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment