From a95408fe9000d2aa5dcfba08a14e973d326bf853 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 14 Jan 2016 00:42:41 +0100 Subject: [PATCH] Improved identifier of tweets. --- test/integration/twitter_test.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/integration/twitter_test.rb b/test/integration/twitter_test.rb index c8741841a..5c9903012 100644 --- a/test/integration/twitter_test.rb +++ b/test/integration/twitter_test.rb @@ -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',