diff options
author | Toon Claes <toon@gitlab.com> | 2017-01-20 13:37:31 +0100 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2017-01-20 13:46:36 +0100 |
commit | dc6fbd27128990baa3b877d6e7e3bd09410d5ef3 (patch) | |
tree | 1a3a83ccea52e41b93615b4867eb0ee0af29b72e | |
parent | d4e9a78593a8cbc7837f3faf14ff8487515d8ab2 (diff) | |
download | gitlab-ce-23079-consider-removing-default-scope-in-sortable.tar.gz |
Do not rely on order when checking finder results23079-consider-removing-default-scope-in-sortable
-rw-r--r-- | spec/finders/projects_finder_spec.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/finders/projects_finder_spec.rb b/spec/finders/projects_finder_spec.rb index 13bda5f7c5a..26a13d4046a 100644 --- a/spec/finders/projects_finder_spec.rb +++ b/spec/finders/projects_finder_spec.rb @@ -33,7 +33,9 @@ describe ProjectsFinder do subject { finder.execute(user) } describe 'without private projects' do - it { is_expected.to eq([public_project, internal_project]) } + it { is_expected.to include(public_project) } + it { is_expected.to include(internal_project) } + it { expect(subject.count).to eq(2) } end describe 'with private projects' do @@ -42,7 +44,10 @@ describe ProjectsFinder do end it do - is_expected.to eq([public_project, internal_project, private_project]) + it { is_expected.to include(public_project) } + it { is_expected.to include(internal_project) } + it { is_expected.to include(private_project) } + it { expect(subject.count).to eq(3) } end end end |