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:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-12 15:07:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-12 15:07:33 +0300
commit784fae4b9d7e92350075df2a43d06893080ed1e6 (patch)
treec7a6fd444acd6897622b233b250a34fd176f01da /spec/lib/constraints
parentfc53ce8e6ca67bf217470179a1ea6cf139bcffad (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/constraints')
-rw-r--r--spec/lib/constraints/project_url_constrainer_spec.rb2
-rw-r--r--spec/lib/constraints/user_url_constrainer_spec.rb2
2 files changed, 4 insertions, 0 deletions
diff --git a/spec/lib/constraints/project_url_constrainer_spec.rb b/spec/lib/constraints/project_url_constrainer_spec.rb
index ac3221ecab7..963e1d5b8e0 100644
--- a/spec/lib/constraints/project_url_constrainer_spec.rb
+++ b/spec/lib/constraints/project_url_constrainer_spec.rb
@@ -37,11 +37,13 @@ describe Constraints::ProjectUrlConstrainer do
context 'and is a GET request' do
let(:request) { build_request(namespace.full_path, old_project_path) }
+
it { expect(subject.matches?(request)).to be_truthy }
end
context 'and is NOT a GET request' do
let(:request) { build_request(namespace.full_path, old_project_path, 'POST') }
+
it { expect(subject.matches?(request)).to be_falsey }
end
end
diff --git a/spec/lib/constraints/user_url_constrainer_spec.rb b/spec/lib/constraints/user_url_constrainer_spec.rb
index 15ef930420c..4f665def3bf 100644
--- a/spec/lib/constraints/user_url_constrainer_spec.rb
+++ b/spec/lib/constraints/user_url_constrainer_spec.rb
@@ -24,11 +24,13 @@ describe Constraints::UserUrlConstrainer do
context 'and is a GET request' do
let(:request) { build_request(redirect_route.path) }
+
it { expect(subject.matches?(request)).to be_truthy }
end
context 'and is NOT a GET request' do
let(:request) { build_request(redirect_route.path, 'POST') }
+
it { expect(subject.matches?(request)).to be_falsey }
end
end