diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /spec/lib/gitlab/checks/change_access_spec.rb | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'spec/lib/gitlab/checks/change_access_spec.rb')
-rw-r--r-- | spec/lib/gitlab/checks/change_access_spec.rb | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/spec/lib/gitlab/checks/change_access_spec.rb b/spec/lib/gitlab/checks/change_access_spec.rb deleted file mode 100644 index 6f82dabb285..00000000000 --- a/spec/lib/gitlab/checks/change_access_spec.rb +++ /dev/null @@ -1,70 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::Checks::ChangeAccess do - describe '#validate!' do - include_context 'change access checks context' - - subject { change_access } - - context 'without failed checks' do - it "doesn't raise an error" do - expect { subject.validate! }.not_to raise_error - end - - it 'calls pushes checks' do - expect_next_instance_of(Gitlab::Checks::PushCheck) do |instance| - expect(instance).to receive(:validate!) - end - - subject.validate! - end - - it 'calls branches checks' do - expect_next_instance_of(Gitlab::Checks::BranchCheck) do |instance| - expect(instance).to receive(:validate!) - end - - subject.validate! - end - - it 'calls tags checks' do - expect_next_instance_of(Gitlab::Checks::TagCheck) do |instance| - expect(instance).to receive(:validate!) - end - - subject.validate! - end - - it 'calls lfs checks' do - expect_next_instance_of(Gitlab::Checks::LfsCheck) do |instance| - expect(instance).to receive(:validate!) - end - - subject.validate! - end - - it 'calls diff checks' do - expect_next_instance_of(Gitlab::Checks::DiffCheck) do |instance| - expect(instance).to receive(:validate!) - end - - subject.validate! - end - end - - context 'when time limit was reached' do - it 'raises a TimeoutError' do - logger = Gitlab::Checks::TimedLogger.new(start_time: timeout.ago, timeout: timeout) - access = described_class.new(changes, - project: project, - user_access: user_access, - protocol: protocol, - logger: logger) - - expect { access.validate! }.to raise_error(Gitlab::Checks::TimedLogger::TimeoutError) - end - end - end -end |