diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-12 12:07:33 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-12 12:07:33 +0000 |
commit | 784fae4b9d7e92350075df2a43d06893080ed1e6 (patch) | |
tree | c7a6fd444acd6897622b233b250a34fd176f01da /spec/lib/constraints | |
parent | fc53ce8e6ca67bf217470179a1ea6cf139bcffad (diff) | |
download | gitlab-ce-784fae4b9d7e92350075df2a43d06893080ed1e6.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/constraints')
-rw-r--r-- | spec/lib/constraints/project_url_constrainer_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/constraints/user_url_constrainer_spec.rb | 2 |
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 |