mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 17:01:09 +08:00
add diagnostics for flaky test
This commit is contained in:
@ -49,6 +49,12 @@ describe SearchController do
|
|||||||
)
|
)
|
||||||
expect(response).to be_success
|
expect(response).to be_success
|
||||||
data = JSON.parse(response.body)
|
data = JSON.parse(response.body)
|
||||||
|
unless (data && data['topics'] && data['topics'][0] && data['topics'][0]['id'])
|
||||||
|
puts "FLAKY TEST"
|
||||||
|
p data
|
||||||
|
p my_post.topic
|
||||||
|
p my_post
|
||||||
|
end
|
||||||
expect(data['topics'][0]['id']).to eq(my_post.topic_id)
|
expect(data['topics'][0]['id']).to eq(my_post.topic_id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user