DEV: Fix flaky topics invite spec due to id collision.
The hardcoded group id eventually became a valid group id leading to 2 groups being attached to the invite.
This commit is contained in:
parent
02b84dbff2
commit
1780961e70
|
@ -3651,11 +3651,11 @@ RSpec.describe TopicsController do
|
||||||
it "should attach group to the invite" do
|
it "should attach group to the invite" do
|
||||||
post "/t/#{group_private_topic.id}/invite.json", params: {
|
post "/t/#{group_private_topic.id}/invite.json", params: {
|
||||||
user: recipient,
|
user: recipient,
|
||||||
group_ids: "#{group.id},123"
|
group_ids: "#{group.id},9999999"
|
||||||
}
|
}
|
||||||
|
|
||||||
expect(response.status).to eq(200)
|
expect(response.status).to eq(200)
|
||||||
expect(Invite.find_by(email: recipient).groups).to eq([group])
|
expect(Invite.find_by(email: recipient).groups).to contain_exactly(group)
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'when group is available to automatic groups only' do
|
describe 'when group is available to automatic groups only' do
|
||||||
|
|
Loading…
Reference in New Issue