mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
FIX: update group user count when bulk adding users
This commit is contained in:
parent
4791b39773
commit
709f201bd4
2 changed files with 17 additions and 0 deletions
|
@ -619,6 +619,13 @@ describe Group do
|
|||
|
||||
expect(group.group_users.map(&:user_id)).to contain_exactly(user.id, admin.id)
|
||||
end
|
||||
|
||||
it 'updates group user count' do
|
||||
expect {
|
||||
group.bulk_add([user.id, admin.id])
|
||||
group.reload
|
||||
}.to change { group.user_count }.by(2)
|
||||
end
|
||||
end
|
||||
|
||||
it "Correctly updates has_messages" do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue