diff options
Diffstat (limited to 'spec/lib/bulk_imports/projects')
3 files changed, 10 insertions, 10 deletions
diff --git a/spec/lib/bulk_imports/projects/pipelines/releases_pipeline_spec.rb b/spec/lib/bulk_imports/projects/pipelines/releases_pipeline_spec.rb index 2633598b48d..a376cdd712c 100644 --- a/spec/lib/bulk_imports/projects/pipelines/releases_pipeline_spec.rb +++ b/spec/lib/bulk_imports/projects/pipelines/releases_pipeline_spec.rb @@ -77,7 +77,7 @@ RSpec.describe BulkImports::Projects::Pipelines::ReleasesPipeline do } end - let(:attributes) {{ 'links' => [link] }} + let(:attributes) { { 'links' => [link] } } it 'restores release links' do pipeline.run @@ -106,7 +106,7 @@ RSpec.describe BulkImports::Projects::Pipelines::ReleasesPipeline do } end - let(:attributes) {{ 'milestone_releases' => [{ 'milestone' => milestone }] }} + let(:attributes) { { 'milestone_releases' => [{ 'milestone' => milestone }] } } it 'restores release milestone' do pipeline.run @@ -133,7 +133,7 @@ RSpec.describe BulkImports::Projects::Pipelines::ReleasesPipeline do end context 'when release is historical' do - let(:attributes) {{ 'released_at' => '2018-12-26T10:17:14.621Z' }} + let(:attributes) { { 'released_at' => '2018-12-26T10:17:14.621Z' } } it 'does not create release evidence' do expect(::Releases::CreateEvidenceWorker).not_to receive(:perform_async) @@ -143,7 +143,7 @@ RSpec.describe BulkImports::Projects::Pipelines::ReleasesPipeline do end context 'when release is upcoming' do - let(:attributes) {{ 'released_at' => Time.zone.now + 30.days }} + let(:attributes) { { 'released_at' => Time.zone.now + 30.days } } it 'does not create release evidence' do expect(::Releases::CreateEvidenceWorker).not_to receive(:perform_async) diff --git a/spec/lib/bulk_imports/projects/pipelines/snippets_repository_pipeline_spec.rb b/spec/lib/bulk_imports/projects/pipelines/snippets_repository_pipeline_spec.rb index 9897e74ec7b..4d12b49e2c0 100644 --- a/spec/lib/bulk_imports/projects/pipelines/snippets_repository_pipeline_spec.rb +++ b/spec/lib/bulk_imports/projects/pipelines/snippets_repository_pipeline_spec.rb @@ -7,7 +7,7 @@ RSpec.describe BulkImports::Projects::Pipelines::SnippetsRepositoryPipeline do let(:project) { create(:project) } let(:bulk_import) { create(:bulk_import, user: user) } let(:bulk_import_configuration) { create(:bulk_import_configuration, bulk_import: bulk_import) } - let!(:matched_snippet) { create(:snippet, project: project, created_at: "1981-12-13T23:59:59Z")} + let!(:matched_snippet) { create(:snippet, project: project, created_at: "1981-12-13T23:59:59Z") } let(:entity) do create( :bulk_import_entity, diff --git a/spec/lib/bulk_imports/projects/transformers/project_attributes_transformer_spec.rb b/spec/lib/bulk_imports/projects/transformers/project_attributes_transformer_spec.rb index a1d77b9732d..c1c4d0bf0db 100644 --- a/spec/lib/bulk_imports/projects/transformers/project_attributes_transformer_spec.rb +++ b/spec/lib/bulk_imports/projects/transformers/project_attributes_transformer_spec.rb @@ -15,7 +15,7 @@ RSpec.describe BulkImports::Projects::Transformers::ProjectAttributesTransformer source_type: :project_entity, bulk_import: bulk_import, source_full_path: 'source/full/path', - destination_name: 'Destination Project Name', + destination_slug: 'Destination Project Name', destination_namespace: destination_group.full_path ) end @@ -32,12 +32,12 @@ RSpec.describe BulkImports::Projects::Transformers::ProjectAttributesTransformer subject(:transformed_data) { described_class.new.transform(context, data) } - it 'transforms name to destination name' do - expect(transformed_data[:name]).to eq(entity.destination_name) + it 'transforms name to destination slug' do + expect(transformed_data[:name]).to eq(entity.destination_slug) end it 'adds path as parameterized name' do - expect(transformed_data[:path]).to eq(entity.destination_name.parameterize) + expect(transformed_data[:path]).to eq(entity.destination_slug.parameterize) end it 'transforms visibility level' do @@ -65,7 +65,7 @@ RSpec.describe BulkImports::Projects::Transformers::ProjectAttributesTransformer source_type: :project_entity, bulk_import: bulk_import, source_full_path: 'source/full/path', - destination_name: 'Destination Project Name', + destination_slug: 'Destination Project Name', destination_namespace: '' ) |