diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-08 00:09:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-08 00:09:46 +0300 |
commit | 6867eff1f997a881cd3ea64109f7ba2d4b42fde4 (patch) | |
tree | a0d4b0ced920ff41311e578b406ed9a7136e8f42 /spec/finders/projects_finder_spec.rb | |
parent | 3290d46655f07d7ae3dca788d6df9f326972ffd8 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/finders/projects_finder_spec.rb')
-rw-r--r-- | spec/finders/projects_finder_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/finders/projects_finder_spec.rb b/spec/finders/projects_finder_spec.rb index 626517f8fa0..379cbe83a08 100644 --- a/spec/finders/projects_finder_spec.rb +++ b/spec/finders/projects_finder_spec.rb @@ -85,6 +85,24 @@ describe ProjectsFinder, :do_not_mock_admin_mode do end end + describe 'regression: Combination of id_before/id_after and joins requires fully qualified column names' do + context 'only returns projects with a project id less than given and matching search' do + subject { finder.execute.joins(:route) } + + let(:params) { { id_before: public_project.id }} + + it { is_expected.to eq([internal_project]) } + end + + context 'only returns projects with a project id greater than given and matching search' do + subject { finder.execute.joins(:route) } + + let(:params) { { id_after: internal_project.id }} + + it { is_expected.to eq([public_project]) } + end + end + describe 'filter by visibility_level' do before do private_project.add_maintainer(user) |