Improved fetching dm.
This commit is contained in:
parent
704898a05b
commit
68dfa2e2a9
1 changed files with 14 additions and 8 deletions
|
@ -149,17 +149,23 @@ class TwitterTest < ActiveSupport::TestCase
|
||||||
text,
|
text,
|
||||||
)
|
)
|
||||||
assert( dm, "dm with ##{hash} created" )
|
assert( dm, "dm with ##{hash} created" )
|
||||||
sleep 25
|
|
||||||
|
|
||||||
# fetch check system account
|
# fetch check system account
|
||||||
Channel.fetch
|
article = nil
|
||||||
|
(1..4).each {|loop|
|
||||||
|
next if article
|
||||||
|
sleep 15
|
||||||
|
|
||||||
|
Channel.fetch
|
||||||
|
|
||||||
|
# check if ticket and article has been created
|
||||||
|
article = Ticket::Article.where( :message_id => dm.id ).last
|
||||||
|
}
|
||||||
|
puts "----------------------------------------"
|
||||||
|
puts "DM: " + dm.inspect
|
||||||
|
puts "AT: " + article.inspect
|
||||||
|
puts "----------------------------------------"
|
||||||
|
|
||||||
# check if ticket and article has been created
|
|
||||||
article = Ticket::Article.where( :message_id => dm.id ).last
|
|
||||||
puts "----------------------------------------"
|
|
||||||
puts "DM: " + dm.inspect
|
|
||||||
puts "AT: " + article.inspect
|
|
||||||
puts "----------------------------------------"
|
|
||||||
assert( article, "inbound article created" )
|
assert( article, "inbound article created" )
|
||||||
# ticket = Ticket.find( article.ticket.id )
|
# ticket = Ticket.find( article.ticket.id )
|
||||||
ticket = article.ticket
|
ticket = article.ticket
|
||||||
|
|
Loading…
Reference in a new issue