diff options
Diffstat (limited to 'spec/serializers')
-rw-r--r-- | spec/serializers/ci/dag_job_group_entity_spec.rb | 2 | ||||
-rw-r--r-- | spec/serializers/ci/dag_pipeline_entity_spec.rb | 6 | ||||
-rw-r--r-- | spec/serializers/ci/dag_stage_entity_spec.rb | 2 | ||||
-rw-r--r-- | spec/serializers/stage_entity_spec.rb | 8 | ||||
-rw-r--r-- | spec/serializers/stage_serializer_spec.rb | 4 |
5 files changed, 11 insertions, 11 deletions
diff --git a/spec/serializers/ci/dag_job_group_entity_spec.rb b/spec/serializers/ci/dag_job_group_entity_spec.rb index d05dd8b05b9..b654b21f583 100644 --- a/spec/serializers/ci/dag_job_group_entity_spec.rb +++ b/spec/serializers/ci/dag_job_group_entity_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' RSpec.describe Ci::DagJobGroupEntity do let_it_be(:request) { double(:request) } let_it_be(:pipeline) { create(:ci_pipeline) } - let_it_be(:stage) { create(:ci_stage_entity, pipeline: pipeline) } + let_it_be(:stage) { create(:ci_stage, pipeline: pipeline) } let(:group) { Ci::Group.new(pipeline.project, stage, name: 'test', jobs: jobs) } let(:entity) { described_class.new(group, request: request) } diff --git a/spec/serializers/ci/dag_pipeline_entity_spec.rb b/spec/serializers/ci/dag_pipeline_entity_spec.rb index 31a0dc5c048..548fd247743 100644 --- a/spec/serializers/ci/dag_pipeline_entity_spec.rb +++ b/spec/serializers/ci/dag_pipeline_entity_spec.rb @@ -43,9 +43,9 @@ RSpec.describe Ci::DagPipelineEntity do end context 'when pipeline has parallel jobs, DAG needs and GenericCommitStatus' do - let!(:stage_build) { create(:ci_stage_entity, name: 'build', position: 1, pipeline: pipeline) } - let!(:stage_test) { create(:ci_stage_entity, name: 'test', position: 2, pipeline: pipeline) } - let!(:stage_deploy) { create(:ci_stage_entity, name: 'deploy', position: 3, pipeline: pipeline) } + let!(:stage_build) { create(:ci_stage, name: 'build', position: 1, pipeline: pipeline) } + let!(:stage_test) { create(:ci_stage, name: 'test', position: 2, pipeline: pipeline) } + let!(:stage_deploy) { create(:ci_stage, name: 'deploy', position: 3, pipeline: pipeline) } let!(:job_build_1) { create(:ci_build, name: 'build 1', stage: 'build', pipeline: pipeline) } let!(:job_build_2) { create(:ci_build, name: 'build 2', stage: 'build', pipeline: pipeline) } diff --git a/spec/serializers/ci/dag_stage_entity_spec.rb b/spec/serializers/ci/dag_stage_entity_spec.rb index 554437ecef5..3530a5e2bae 100644 --- a/spec/serializers/ci/dag_stage_entity_spec.rb +++ b/spec/serializers/ci/dag_stage_entity_spec.rb @@ -6,7 +6,7 @@ RSpec.describe Ci::DagStageEntity do let_it_be(:pipeline) { create(:ci_pipeline) } let_it_be(:request) { double(:request) } - let(:stage) { create(:ci_stage_entity, pipeline: pipeline, name: 'test') } + let(:stage) { create(:ci_stage, pipeline: pipeline, name: 'test') } let(:entity) { described_class.new(stage, request: request) } let!(:job) { create(:ci_build, :success, pipeline: pipeline, stage_id: stage.id) } diff --git a/spec/serializers/stage_entity_spec.rb b/spec/serializers/stage_entity_spec.rb index ab74ce76cbd..95d3fd254d4 100644 --- a/spec/serializers/stage_entity_spec.rb +++ b/spec/serializers/stage_entity_spec.rb @@ -12,7 +12,7 @@ RSpec.describe StageEntity do end let(:stage) do - create(:ci_stage_entity, pipeline: pipeline, status: :success) + create(:ci_stage, pipeline: pipeline, status: :success) end before do @@ -74,7 +74,7 @@ RSpec.describe StageEntity do end context 'with a skipped stage ' do - let(:stage) { create(:ci_stage_entity, status: 'skipped') } + let(:stage) { create(:ci_stage, status: 'skipped') } it 'contains play_all_manual' do expect(subject[:status][:action]).to be_present @@ -82,7 +82,7 @@ RSpec.describe StageEntity do end context 'with a scheduled stage ' do - let(:stage) { create(:ci_stage_entity, status: 'scheduled') } + let(:stage) { create(:ci_stage, status: 'scheduled') } it 'contains play_all_manual' do expect(subject[:status][:action]).to be_present @@ -90,7 +90,7 @@ RSpec.describe StageEntity do end context 'with a manual stage ' do - let(:stage) { create(:ci_stage_entity, status: 'manual') } + let(:stage) { create(:ci_stage, status: 'manual') } it 'contains play_all_manual' do expect(subject[:status][:action]).to be_present diff --git a/spec/serializers/stage_serializer_spec.rb b/spec/serializers/stage_serializer_spec.rb index 0b5e87dc95b..24e8057375b 100644 --- a/spec/serializers/stage_serializer_spec.rb +++ b/spec/serializers/stage_serializer_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' RSpec.describe StageSerializer do let(:project) { create(:project, :repository) } let(:user) { create(:user) } - let(:resource) { create(:ci_stage_entity) } + let(:resource) { create(:ci_stage) } let(:serializer) do described_class.new(current_user: user, project: project) @@ -21,7 +21,7 @@ RSpec.describe StageSerializer do end context 'with an array of entities' do - let(:resource) { create_list(:ci_stage_entity, 2) } + let(:resource) { create_list(:ci_stage, 2) } it 'serializes the array of pipelines' do expect(subject).not_to be_empty |