FEATURE: display PM participant group names in the topics list. (#21677)

After this change, we can view all participant group names on the topic list page.

Co-authored-by: Régis Hanol <regis@hanol.fr>
This commit is contained in:
Vinoth Kannan
2023-05-31 19:32:06 +05:30
committed by GitHub
parent c01580298e
commit d4bfd441ba
14 changed files with 157 additions and 8 deletions

View File

@ -0,0 +1,21 @@
# frozen_string_literal: true
RSpec.describe GroupLookup do
fab!(:group) { Fabricate(:group) }
describe "#[]" do
before { @group_lookup = GroupLookup.new([group.id, nil]) }
it "returns nil if group_id does not exists" do
expect(@group_lookup[0]).to eq(nil)
end
it "returns nil if group_id is nil" do
expect(@group_lookup[nil]).to eq(nil)
end
it "returns name if group_id exists" do
expect(@group_lookup[group.id]).to eq(group.name)
end
end
end