diff options
author | Toon Claes <toon@gitlab.com> | 2017-05-23 23:38:12 +0300 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2017-05-30 23:45:59 +0300 |
commit | 0725050802dd30d4c235b6a2d28dd494d2d7429b (patch) | |
tree | 75d15c61638311a9bd53d291856708955e29badd /spec/finders/projects_finder_spec.rb | |
parent | 8e72ad70bd2479ae5a465eac1df74f99f03ea731 (diff) |
Change ProjectFinder so starred can be combined with other filters
The `starred` parameter couldn't be used in combination with `trending` or
`non_public`. But this is changed now.
Diffstat (limited to 'spec/finders/projects_finder_spec.rb')
-rw-r--r-- | spec/finders/projects_finder_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/finders/projects_finder_spec.rb b/spec/finders/projects_finder_spec.rb index 148adcffe3b..077f2624388 100644 --- a/spec/finders/projects_finder_spec.rb +++ b/spec/finders/projects_finder_spec.rb @@ -146,13 +146,19 @@ describe ProjectsFinder do it { is_expected.to eq([private_project]) } end - describe 'filter by viewable_starred_projects' do + describe 'filter by starred' do let(:params) { { starred: true } } before do current_user.toggle_star(public_project) end it { is_expected.to eq([public_project]) } + + it 'returns only projects the user has access to' do + current_user.toggle_star(private_project) + + is_expected.to eq([public_project]) + end end describe 'sorting' do |