diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-21 18:12:00 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-21 18:12:00 +0300 |
commit | 6323146895db2be6f04846b3c98060b7349207b9 (patch) | |
tree | 9b29de45421be0a9a6126001bd920d780467b1db /spec/models | |
parent | 2779809e45970e7660521b94dbebcf24ed00d60d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/ci/pipeline_spec.rb | 6 | ||||
-rw-r--r-- | spec/models/commit_collection_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/commit_status_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/deployment_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/design_management/design_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/integrations/chat_message/push_message_spec.rb | 8 | ||||
-rw-r--r-- | spec/models/integrations/teamcity_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/merge_request_diff_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/note_diff_file_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/repository_spec.rb | 6 |
10 files changed, 17 insertions, 17 deletions
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index 024d3ae4240..e075ea232d3 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -2349,14 +2349,14 @@ RSpec.describe Ci::Pipeline, :mailer, factory_default: :keep, feature_category: end it 'runs on a branch update push' do - expect(pipeline.before_sha).not_to be Gitlab::Git::BLANK_SHA + expect(pipeline.before_sha).not_to be Gitlab::Git::SHA1_BLANK_SHA expect(pipeline.branch_updated?).to be true end end context 'when pipeline does not have before SHA' do before do - pipeline.update!(before_sha: Gitlab::Git::BLANK_SHA) + pipeline.update!(before_sha: Gitlab::Git::SHA1_BLANK_SHA) end it 'does not run on a branch updating push' do @@ -2384,7 +2384,7 @@ RSpec.describe Ci::Pipeline, :mailer, factory_default: :keep, feature_category: context 'when either old or new revision is missing' do before do - pipeline.update!(before_sha: Gitlab::Git::BLANK_SHA) + pipeline.update!(before_sha: Gitlab::Git::SHA1_BLANK_SHA) end it 'returns nil' do diff --git a/spec/models/commit_collection_spec.rb b/spec/models/commit_collection_spec.rb index be80aced3fd..5db417f8032 100644 --- a/spec/models/commit_collection_spec.rb +++ b/spec/models/commit_collection_spec.rb @@ -210,7 +210,7 @@ RSpec.describe CommitCollection, feature_category: :source_code_management do it 'returns the original commit if the commit could not be lazy loaded' do collection = described_class.new(project, [hash_commit]) - unexisting_lazy_commit = Commit.lazy(project, Gitlab::Git::BLANK_SHA) + unexisting_lazy_commit = Commit.lazy(project, Gitlab::Git::SHA1_BLANK_SHA) expect(Commit).to receive(:lazy).with(project, hash_commit.id).and_return(unexisting_lazy_commit) diff --git a/spec/models/commit_status_spec.rb b/spec/models/commit_status_spec.rb index 618dd3a3f77..7c4917596a0 100644 --- a/spec/models/commit_status_spec.rb +++ b/spec/models/commit_status_spec.rb @@ -583,7 +583,7 @@ RSpec.describe CommitStatus, feature_category: :continuous_integration do end it 'returns blank sha' do - is_expected.to eq(Gitlab::Git::BLANK_SHA) + is_expected.to eq(Gitlab::Git::SHA1_BLANK_SHA) end end diff --git a/spec/models/deployment_spec.rb b/spec/models/deployment_spec.rb index cb2c38c15e0..b8217ffd2c9 100644 --- a/spec/models/deployment_spec.rb +++ b/spec/models/deployment_spec.rb @@ -878,7 +878,7 @@ RSpec.describe Deployment, feature_category: :continuous_delivery do context 'when the SHA for the deployment does not exist in the repo' do it 'returns false' do - deployment.update!(sha: Gitlab::Git::BLANK_SHA) + deployment.update!(sha: Gitlab::Git::SHA1_BLANK_SHA) commit = project.commit expect(deployment.includes_commit?(commit.id)).to be false diff --git a/spec/models/design_management/design_spec.rb b/spec/models/design_management/design_spec.rb index 98e5399f737..882aaffa818 100644 --- a/spec/models/design_management/design_spec.rb +++ b/spec/models/design_management/design_spec.rb @@ -447,7 +447,7 @@ RSpec.describe DesignManagement::Design, feature_category: :design_management do let(:versions_count) { 1 } it 'builds diff refs based on the empty tree if there was only one version' do - expect(design.diff_refs.base_sha).to eq(Gitlab::Git::BLANK_SHA) + expect(design.diff_refs.base_sha).to eq(Gitlab::Git::SHA1_BLANK_SHA) expect(design.diff_refs.head_sha).to eq(design.diff_refs.head_sha) end end diff --git a/spec/models/integrations/chat_message/push_message_spec.rb b/spec/models/integrations/chat_message/push_message_spec.rb index a9d0f801406..ba619f655ec 100644 --- a/spec/models/integrations/chat_message/push_message_spec.rb +++ b/spec/models/integrations/chat_message/push_message_spec.rb @@ -72,7 +72,7 @@ RSpec.describe Integrations::ChatMessage::PushMessage do let(:args) do { after: 'after', - before: Gitlab::Git::BLANK_SHA, + before: Gitlab::Git::SHA1_BLANK_SHA, project_name: 'project_name', ref: 'refs/tags/new_tag', user_name: 'test.user', @@ -112,7 +112,7 @@ RSpec.describe Integrations::ChatMessage::PushMessage do context 'removed tag' do let(:args) do { - after: Gitlab::Git::BLANK_SHA, + after: Gitlab::Git::SHA1_BLANK_SHA, before: 'before', project_name: 'project_name', ref: 'refs/tags/new_tag', @@ -152,7 +152,7 @@ RSpec.describe Integrations::ChatMessage::PushMessage do context 'new branch' do before do - args[:before] = Gitlab::Git::BLANK_SHA + args[:before] = Gitlab::Git::SHA1_BLANK_SHA end context 'without markdown' do @@ -185,7 +185,7 @@ RSpec.describe Integrations::ChatMessage::PushMessage do context 'removed branch' do before do - args[:after] = Gitlab::Git::BLANK_SHA + args[:after] = Gitlab::Git::SHA1_BLANK_SHA end context 'without markdown' do diff --git a/spec/models/integrations/teamcity_spec.rb b/spec/models/integrations/teamcity_spec.rb index 1537b10ba03..2294e687296 100644 --- a/spec/models/integrations/teamcity_spec.rb +++ b/spec/models/integrations/teamcity_spec.rb @@ -246,7 +246,7 @@ RSpec.describe Integrations::Teamcity, :use_clean_rails_memory_store_caching do end it 'returns nil when ref is blank' do - data[:after] = Gitlab::Git::BLANK_SHA + data[:after] = Gitlab::Git::SHA1_BLANK_SHA expect(integration.execute(data)).to be_nil end diff --git a/spec/models/merge_request_diff_spec.rb b/spec/models/merge_request_diff_spec.rb index 2e68cd9e74a..3b4b9fd30fe 100644 --- a/spec/models/merge_request_diff_spec.rb +++ b/spec/models/merge_request_diff_spec.rb @@ -1206,7 +1206,7 @@ RSpec.describe MergeRequestDiff, feature_category: :code_review_workflow do it 'returns false if passed commits do not exist' do expect(subject.includes_any_commits?([])).to eq(false) - expect(subject.includes_any_commits?([Gitlab::Git::BLANK_SHA])).to eq(false) + expect(subject.includes_any_commits?([Gitlab::Git::SHA1_BLANK_SHA])).to eq(false) end it 'returns true if passed commits exists' do diff --git a/spec/models/note_diff_file_spec.rb b/spec/models/note_diff_file_spec.rb index 1ece1dfea59..5d9381b5886 100644 --- a/spec/models/note_diff_file_spec.rb +++ b/spec/models/note_diff_file_spec.rb @@ -32,7 +32,7 @@ RSpec.describe NoteDiffFile do end it 'excludes note diff files with the wrong sha' do - found = described_class.referencing_sha(Gitlab::Git::BLANK_SHA, project_id: project.id) + found = described_class.referencing_sha(Gitlab::Git::SHA1_BLANK_SHA, project_id: project.id) expect(found).to be_empty end diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index eeb0bbb8e7d..ca2ee447b4c 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -661,7 +661,7 @@ RSpec.describe Repository, feature_category: :source_code_management do describe '#blob_at' do context 'blank sha' do - subject { repository.blob_at(Gitlab::Git::BLANK_SHA, '.gitignore') } + subject { repository.blob_at(Gitlab::Git::SHA1_BLANK_SHA, '.gitignore') } it { is_expected.to be_nil } end @@ -3226,8 +3226,8 @@ RSpec.describe Repository, feature_category: :source_code_management do end it 'returns false for invalid commit IDs' do - expect(repository.ancestor?(commit.id, Gitlab::Git::BLANK_SHA)).to eq(false) - expect(repository.ancestor?(Gitlab::Git::BLANK_SHA, commit.id)).to eq(false) + expect(repository.ancestor?(commit.id, Gitlab::Git::SHA1_BLANK_SHA)).to eq(false) + expect(repository.ancestor?(Gitlab::Git::SHA1_BLANK_SHA, commit.id)).to eq(false) end end |