DEV: Fix a flaky spec (#15529)

It's very much possible for there to be a topic with id 999.
This commit is contained in:
Jarek Radosz
2022-01-11 01:51:57 +01:00
committed by GitHub
parent 8e2dd937cb
commit 0d9ab0beb3

View File

@@ -3986,7 +3986,9 @@ RSpec.describe TopicsController do
describe 'when topic id is invalid' do describe 'when topic id is invalid' do
it 'should return the right response' do it 'should return the right response' do
post "/t/999/invite.json", params: { id = topic.id
topic.destroy!
post "/t/#{id}/invite.json", params: {
email: user.email email: user.email
} }