diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-01 12:07:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-01 12:07:45 +0300 |
commit | b11f7057d067885619ee3e513751f180b2e8ad85 (patch) | |
tree | dfb3077ea8716ed217f5ce4324be4e25a450c599 /spec/finders/projects_finder_spec.rb | |
parent | e50050a8756a20b6aa118edbad3369674e4c63ba (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 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/finders/projects_finder_spec.rb b/spec/finders/projects_finder_spec.rb index eb3e28d1668..626517f8fa0 100644 --- a/spec/finders/projects_finder_spec.rb +++ b/spec/finders/projects_finder_spec.rb @@ -222,6 +222,28 @@ describe ProjectsFinder, :do_not_mock_admin_mode do it { is_expected.to match_array([public_project, internal_project]) } end + describe 'filter by last_activity_after' do + let(:params) { { last_activity_after: 60.minutes.ago } } + + before do + internal_project.update(last_activity_at: Time.now) + public_project.update(last_activity_at: 61.minutes.ago) + end + + it { is_expected.to match_array([internal_project]) } + end + + describe 'filter by last_activity_before' do + let(:params) { { last_activity_before: 60.minutes.ago } } + + before do + internal_project.update(last_activity_at: Time.now) + public_project.update(last_activity_at: 61.minutes.ago) + end + + it { is_expected.to match_array([public_project]) } + end + describe 'sorting' do let(:params) { { sort: 'name_asc' } } |