From 9d046c8704c0e7df18d2f9e380e987d22b9a0b2e Mon Sep 17 00:00:00 2001 From: Mark Chao Date: Mon, 18 Feb 2019 11:51:56 +0800 Subject: Fix git clone revealing private repo's presence Ensure redirection to path with .git suffix regardless whether project exists or not. --- spec/lib/constraints/project_url_constrainer_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'spec/lib') diff --git a/spec/lib/constraints/project_url_constrainer_spec.rb b/spec/lib/constraints/project_url_constrainer_spec.rb index c96e7ab8495..3496b01ebcc 100644 --- a/spec/lib/constraints/project_url_constrainer_spec.rb +++ b/spec/lib/constraints/project_url_constrainer_spec.rb @@ -16,6 +16,10 @@ describe Constraints::ProjectUrlConstrainer do let(:request) { build_request('foo', 'bar') } it { expect(subject.matches?(request)).to be_falsey } + + context 'existence_check is false' do + it { expect(subject.matches?(request, existence_check: false)).to be_truthy } + end end context "project id ending with .git" do -- cgit v1.2.1