diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-24 01:43:31 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-24 01:43:31 +0000 |
commit | e20a1cde5d740fbc9f4d033786a8cd5ad7eb8b4d (patch) | |
tree | cf76b0527f1909eaf1ecac057a4ccc7591cce4f6 /spec/lib | |
parent | 5fc725def41e6973e92bc32095774edd60fd154f (diff) | |
download | gitlab-ce-e20a1cde5d740fbc9f4d033786a8cd5ad7eb8b4d.tar.gz |
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/api/entities/project_import_status_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/lib/api/entities/project_import_status_spec.rb b/spec/lib/api/entities/project_import_status_spec.rb index 650f9c156a3..a800d703496 100644 --- a/spec/lib/api/entities/project_import_status_spec.rb +++ b/spec/lib/api/entities/project_import_status_spec.rb @@ -8,6 +8,17 @@ describe API::Entities::ProjectImportStatus do let(:correlation_id) { 'cid' } + context 'when no import state exists' do + let(:entity) { described_class.new(build(:project)) } + + it 'includes basic fields and no failures' do + expect(subject[:import_status]).to eq('none') + expect(subject[:correlation_id]).to be_nil + expect(subject[:import_error]).to be_nil + expect(subject[:failed_relations]).to eq([]) + end + end + context 'when import has not finished yet' do let(:project) { create(:project, :import_scheduled, import_correlation_id: correlation_id) } let(:entity) { described_class.new(project) } |