Improved identifier of tweets.
This commit is contained in:
parent
9e95305ace
commit
a95408fe90
1 changed files with 8 additions and 8 deletions
|
@ -88,7 +88,7 @@ class TwitterTest < ActiveSupport::TestCase
|
|||
|
||||
test 'a new outbound and reply' do
|
||||
|
||||
hash = '#citheo42' + rand(9999).to_s
|
||||
hash = '#citheo42' + rand(99_999).to_s
|
||||
user = User.find(2)
|
||||
text = "Today the weather is really nice... #{hash}"
|
||||
ticket = Ticket.create(
|
||||
|
@ -134,7 +134,7 @@ class TwitterTest < ActiveSupport::TestCase
|
|||
}
|
||||
assert(tweet_found, "found outbound '#{text}' tweet '#{article.message_id}'")
|
||||
|
||||
reply_text = '@armin_theo on my side the weather is nice, too! 😍😍😍 #weather' + rand(9999).to_s
|
||||
reply_text = '@armin_theo on my side the weather is nice, too! 😍😍😍 #weather' + rand(99_999).to_s
|
||||
tweet = client.update(
|
||||
reply_text,
|
||||
{
|
||||
|
@ -178,7 +178,7 @@ class TwitterTest < ActiveSupport::TestCase
|
|||
config.access_token_secret = me_bauer_token_secret
|
||||
end
|
||||
|
||||
hash = '#citheo24 #' + rand(9999).to_s
|
||||
hash = '#citheo24 #' + rand(99_999).to_s
|
||||
text = "Today... #{hash}"
|
||||
tweet = client.update(
|
||||
text,
|
||||
|
@ -201,7 +201,7 @@ class TwitterTest < ActiveSupport::TestCase
|
|||
ticket = article.ticket
|
||||
|
||||
# send reply
|
||||
reply_text = '@me_bauer on my side #weather' + rand(9999).to_s
|
||||
reply_text = '@me_bauer on my side #weather' + rand(99_999).to_s
|
||||
article = Ticket::Article.create(
|
||||
ticket_id: ticket.id,
|
||||
body: reply_text,
|
||||
|
@ -254,7 +254,7 @@ class TwitterTest < ActiveSupport::TestCase
|
|||
dms.each {|dm|
|
||||
client.destroy_direct_message(dm.id)
|
||||
}
|
||||
hash = '#citheo44' + rand(9999).to_s
|
||||
hash = '#citheo44' + rand(99_999).to_s
|
||||
text = 'How about the details? ' + hash
|
||||
dm = client.create_direct_message(
|
||||
'armin_theo',
|
||||
|
@ -382,7 +382,7 @@ class TwitterTest < ActiveSupport::TestCase
|
|||
config.access_token = me_bauer_token
|
||||
config.access_token_secret = me_bauer_token_secret
|
||||
end
|
||||
hash = '#citheo24 #' + rand(9999).to_s
|
||||
hash = '#citheo24 #' + rand(99_999).to_s
|
||||
text = "Today... #{hash}"
|
||||
tweet = client.update(
|
||||
text,
|
||||
|
@ -405,7 +405,7 @@ class TwitterTest < ActiveSupport::TestCase
|
|||
config.access_token = me_bauer_token
|
||||
config.access_token_secret = me_bauer_token_secret
|
||||
end
|
||||
hash = '#citheo24 #' + rand(9999).to_s
|
||||
hash = '#citheo24 #' + rand(99_999).to_s
|
||||
text = "Today...2 #{hash}"
|
||||
tweet = client.update(
|
||||
text,
|
||||
|
@ -429,7 +429,7 @@ class TwitterTest < ActiveSupport::TestCase
|
|||
access_token: me_bauer_token,
|
||||
access_token_secret: me_bauer_token_secret
|
||||
)
|
||||
hash = '#citheo44' + rand(9999).to_s
|
||||
hash = '#citheo44' + rand(99_999).to_s
|
||||
text = 'How about the details? ' + hash
|
||||
dm = client.create_direct_message(
|
||||
'armin_theo',
|
||||
|
|
Loading…
Reference in a new issue