summaryrefslogtreecommitdiff
path: root/spec/helpers/groups_helper_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-04 21:08:34 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-04 21:08:34 +0000
commit484a245a95e97ae97f558a3d242f599853eb6d3c (patch)
treeb267e42f87c1944428ce14e8c87c1713772397da /spec/helpers/groups_helper_spec.rb
parent23dda8d4edb3c0efeb34586969ce0c64e385f936 (diff)
downloadgitlab-ce-484a245a95e97ae97f558a3d242f599853eb6d3c.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers/groups_helper_spec.rb')
-rw-r--r--spec/helpers/groups_helper_spec.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/helpers/groups_helper_spec.rb b/spec/helpers/groups_helper_spec.rb
index 0b6e51c26f5..a38483a956d 100644
--- a/spec/helpers/groups_helper_spec.rb
+++ b/spec/helpers/groups_helper_spec.rb
@@ -531,12 +531,14 @@ RSpec.describe GroupsHelper do
describe '#group_overview_tabs_app_data' do
let_it_be(:group) { create(:group) }
let_it_be(:user) { create(:user) }
+ let_it_be(:initial_sort) { 'created_asc' }
before do
allow(helper).to receive(:current_user).and_return(user)
allow(helper).to receive(:can?).with(user, :create_subgroup, group) { true }
allow(helper).to receive(:can?).with(user, :create_projects, group) { true }
+ allow(helper).to receive(:project_list_sort_by).and_return(initial_sort)
end
it 'returns expected hash' do
@@ -545,7 +547,8 @@ RSpec.describe GroupsHelper do
subgroups_and_projects_endpoint: including("/groups/#{group.path}/-/children.json"),
shared_projects_endpoint: including("/groups/#{group.path}/-/shared_projects.json"),
archived_projects_endpoint: including("/groups/#{group.path}/-/children.json?archived=only"),
- current_group_visibility: group.visibility
+ current_group_visibility: group.visibility,
+ initial_sort: initial_sort
}.merge(helper.group_overview_tabs_app_data(group))
)
end