discourse/spec/fabricators/invite_fabricator.rb
Natalie Tay 55bf0e21fb
FIX: Don't show that an existing user is invited_by another user (#27665)
If an existing user (John) accepts an invite created by Kenny to a group, John may be seen as invited by Kenny, despite already having an account on the site.

This fix removes the bug by excluding invites that determine the invited_by after the user's creation date. The delay buffer in the query accounts for invites that also create the user at the same time.
2024-07-04 10:27:37 +08:00

12 lines
178 B
Ruby

# frozen_string_literal: true
Fabricator(:invite) do
invited_by(fabricator: :user)
email "iceking@ADVENTURETIME.ooo"
end
Fabricator(:invited_group) do
group
invite
end