diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-09-13 17:16:30 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-04 22:49:41 +0200 |
commit | 3a4dc55f2924debcdbb37eb63d8ce57b1358df81 (patch) | |
tree | 614d82e8b26b5c2698c564d9e244a86c35d714fe /spec/controllers/explore | |
parent | 39df53ff0aeac24d390eea52a1df6dfe103a4c14 (diff) | |
download | gitlab-ce-3a4dc55f2924debcdbb37eb63d8ce57b1358df81.tar.gz |
Reuse the groups tree for explore and dashboard.
Diffstat (limited to 'spec/controllers/explore')
-rw-r--r-- | spec/controllers/explore/groups_controller_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/controllers/explore/groups_controller_spec.rb b/spec/controllers/explore/groups_controller_spec.rb new file mode 100644 index 00000000000..1923d054e95 --- /dev/null +++ b/spec/controllers/explore/groups_controller_spec.rb @@ -0,0 +1,24 @@ +require 'spec_helper' + +describe Explore::GroupsController do + let(:user) { create(:user) } + + before do + sign_in(user) + end + + it 'renders group trees' do + expect(described_class).to include(GroupTree) + end + + it 'includes public projects' do + member_of_group = create(:group) + member_of_group.add_developer(user) + public_group = create(:group, :public) + + get :index + + expect(assigns(:groups)).to contain_exactly(member_of_group, public_group) + end + +end |