DEV: Fix flaky topics invite spec due to id collision. (PR #13854)

The hardcoded group id eventually became a valid group id leading to 2 groups being attached to the invite.

GitHub

See how group id 123 appears in the flaky test output:

Failure/Error: expect(Invite.find_by(email: recipient).groups).to eq([group])

  expected: [#<Group id: 126, name: "my_group_69", created_at: "2021-07-19 14:08:27.186878000 +0000", updated_at:...: nil, smtp_updated_by_id: nil, imap_enabled: false, imap_updated_at: nil, imap_updated_by_id: nil>]
       got: #<ActiveRecord::Associations::CollectionProxy [#<Group id: 123, name: "my_group_66", created_at: "202... nil, smtp_updated_by_id: nil, imap_enabled: false, imap_updated_at: nil, imap_updated_by_id: nil>]>

  (compared using ==)

  Diff:
  @@ -1,102 +1,203 @@
  -[#<Group id: 126, name: "my_group_69", created_at: "2021-07-19 14:08:27.186878000 +0000", updated_at: "2021-07-19 14:08:27.186878000 +0000", automatic: false, user_count: 1, automatic_membership_email_domains: nil, primary_group: false, title: nil, grant_trust_level: nil, incoming_email: nil, has_messages: false, flair_bg_color: nil, flair_color: nil, bio_raw: nil, bio_cooked: nil, allow_membership_requests: false, full_name: nil, default_notification_level: 3, visibility_level: 0, public_exit: false, public_admission: false, membership_request_template: nil, messageable_level: 0, mentionable_level: 0, smtp_server: nil, smtp_port: nil, smtp_ssl: nil, imap_server: nil, imap_port: nil, imap_ssl: nil, imap_mailbox_name: "", imap_uid_validity: 0, imap_last_uid: 0, email_username: nil, email_password: nil, publish_read_state: false, members_visibility_level: 0, imap_last_error: nil, imap_old_emails: nil, imap_new_emails: nil, flair_icon: nil, flair_upload_id: nil, allow_unknown_sender_topic_replies: false, smtp_enabled: false, smtp_updated_at: nil, smtp_updated_by_id: nil, imap_enabled: false, imap_updated_at: nil, imap_updated_by_id: nil>]
  +[#<Group:0x000055cc81290b28
  +  id: 123,

We could do more, like making sure the group with the magic ID is deleted just before doing the POST, but I find it extremely unlikely that we will end up with almost 10 million groups in a test run.