Fixed bug: Fetching twitter article may take some time.

This commit is contained in:
Thorsten Eckel 2015-07-17 09:39:17 +02:00
parent 2edeef76e1
commit 4eef31faeb

View file

@ -147,8 +147,18 @@ class TwitterTest < ActiveSupport::TestCase
# fetch check system account
Channel.fetch
# check if follow up article has been created
article = Ticket::Article.find_by( message_id: tweet.id )
# fetch check system account
article = nil
(1..4).each {
Channel.fetch
# check if ticket and article has been created
article = Ticket::Article.find_by( message_id: tweet.id )
break if article
sleep 5
}
assert(article)
ticket = article.ticket