diff --git a/app/serializers/current_user_serializer.rb b/app/serializers/current_user_serializer.rb index 84fed1f8a08..1eafd222212 100644 --- a/app/serializers/current_user_serializer.rb +++ b/app/serializers/current_user_serializer.rb @@ -52,7 +52,7 @@ class CurrentUserSerializer < BasicUserSerializer :skip_new_user_tips def groups - object.visible_groups.pluck(:id, :name).map { |id, name| { id: id, name: name.downcase } } + object.visible_groups.pluck(:id, :name).map { |id, name| { id: id, name: name } } end def link_posting_access diff --git a/spec/serializers/current_user_serializer_spec.rb b/spec/serializers/current_user_serializer_spec.rb index 9a06bec7f74..0ff5c54e475 100644 --- a/spec/serializers/current_user_serializer_spec.rb +++ b/spec/serializers/current_user_serializer_spec.rb @@ -128,7 +128,7 @@ RSpec.describe CurrentUserSerializer do it "should only show visible groups" do Fabricate.build(:group, visibility_level: Group.visibility_levels[:public]) hidden_group = Fabricate.build(:group, visibility_level: Group.visibility_levels[:owners]) - public_group = Fabricate.build(:group, visibility_level: Group.visibility_levels[:public]) + public_group = Fabricate.build(:group, visibility_level: Group.visibility_levels[:public], name: "UppercaseGroupName") hidden_group.add(member) hidden_group.save! public_group.add(member)