diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-11-21 12:37:06 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-11-21 12:37:06 +0300 |
commit | e920414e6cbb3950456892b3ab7c9d9d7b0d056f (patch) | |
tree | b438cf72284f194e4634f07cc5be9192b32905dc /spec | |
parent | 03755fb38f58c7a2e8f4b2c10847974dab964977 (diff) | |
parent | fed059a12ddde628a7d19d008c199da00990ce19 (diff) |
Merge branch 'gitlab-ee-d39de0ea-backport' into 'master'
Port GitLab EE ProjectsFinder changes
These changes were added in GitLab EE commit
d39de0ea91b26b8840195e5674b92c353cc16661. The tests were a bit bugged
(they used a non existing group, thus not testing a crucial part) which
I only noticed when porting CE changes to EE.
See merge request !1854
Diffstat (limited to 'spec')
-rw-r--r-- | spec/finders/projects_finder_spec.rb | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/spec/finders/projects_finder_spec.rb b/spec/finders/projects_finder_spec.rb index d1dede78f74..f32641ef0f6 100644 --- a/spec/finders/projects_finder_spec.rb +++ b/spec/finders/projects_finder_spec.rb @@ -3,10 +3,19 @@ require 'spec_helper' describe ProjectsFinder do describe '#execute' do let(:user) { create(:user) } + let(:group) { create(:group) } - let!(:private_project) { create(:project, :private) } - let!(:internal_project) { create(:project, :internal) } - let!(:public_project) { create(:project, :public) } + let!(:private_project) do + create(:project, :private, name: 'A', path: 'A') + end + + let!(:internal_project) do + create(:project, :internal, group: group, name: 'B', path: 'B') + end + + let!(:public_project) do + create(:project, :public, group: group, name: 'C', path: 'C') + end let(:finder) { described_class.new } @@ -38,8 +47,6 @@ describe ProjectsFinder do end describe 'with a group' do - let(:group) { public_project.group } - describe 'without a user' do subject { finder.execute(nil, group: group) } |