Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/git/push_spec.rb')
-rw-r--r--spec/lib/gitlab/git/push_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/gitlab/git/push_spec.rb b/spec/lib/gitlab/git/push_spec.rb
index 0f52f10c0a6..8ba43b2967c 100644
--- a/spec/lib/gitlab/git/push_spec.rb
+++ b/spec/lib/gitlab/git/push_spec.rb
@@ -86,6 +86,16 @@ RSpec.describe Gitlab::Git::Push do
it { is_expected.to be_force_push }
end
+
+ context 'when called muiltiple times' do
+ it 'does not make make multiple calls to the force push check' do
+ expect(Gitlab::Checks::ForcePush).to receive(:force_push?).once
+
+ 2.times do
+ subject.force_push?
+ end
+ end
+ end
end
describe '#branch_added?' do