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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -3986,7 +3986,9 @@ RSpec.describe TopicsController do
describe 'when topic id is invalid' 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
}