From fd38539b41695095b2ade80ae2fc2a905ce28e79 Mon Sep 17 00:00:00 2001 From: r888888888 Date: Mon, 12 Sep 2016 18:02:08 -0700 Subject: [PATCH] fix twitter upload tests --- .../functional/upload/twitter.yml | 447 ++++++++++++++++++ .../vcr_cassettes/upload-new-twitter.yml | 348 ++++++++++++++ .../bulk_update_requests_controller_test.rb | 2 +- .../tag_alias_requests_controller_test.rb | 2 +- test/functional/uploads_controller_test.rb | 6 +- 5 files changed, 800 insertions(+), 5 deletions(-) create mode 100644 test/fixtures/vcr_cassettes/functional/upload/twitter.yml create mode 100644 test/fixtures/vcr_cassettes/upload-new-twitter.yml diff --git a/test/fixtures/vcr_cassettes/functional/upload/twitter.yml b/test/fixtures/vcr_cassettes/functional/upload/twitter.yml new file mode 100644 index 000000000..f944ea437 --- /dev/null +++ b/test/fixtures/vcr_cassettes/functional/upload/twitter.yml @@ -0,0 +1,447 @@ +--- +http_interactions: +- request: + method: post + uri: https://SENSITIVE:SENSITIVE@api.twitter.com/oauth2/token + body: + encoding: UTF-8 + string: grant_type=client_credentials + headers: + Accept: + - "*/*" + User-Agent: + - TwitterRubyGem/5.14.0 + Content-Type: + - application/x-www-form-urlencoded; charset=UTF-8 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, no-store, must-revalidate, pre-check=0, post-check=0 + Content-Disposition: + - attachment; filename=json.json + Content-Length: + - '151' + Content-Type: + - application/json;charset=utf-8 + Date: + - Tue, 13 Sep 2016 01:01:46 GMT + Expires: + - Tue, 31 Mar 1981 05:00:00 GMT + Last-Modified: + - Tue, 13 Sep 2016 01:01:46 GMT + Ml: + - S + Pragma: + - no-cache + Server: + - tsa_a + Set-Cookie: + - guest_id=v1%3A147372850631484786; Domain=.twitter.com; Path=/; Expires=Thu, + 13-Sep-2018 01:01:46 UTC + Status: + - 200 OK + Strict-Transport-Security: + - max-age=631138519 + X-Connection-Hash: + - c23a28e6912b37141bc8000847077cdd + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Response-Time: + - '37' + X-Transaction: + - 00c73d8100415cf7 + X-Tsa-Request-Body-Time: + - '0' + X-Twitter-Response-Tags: + - BouncerCompliant + X-Ua-Compatible: + - IE=edge,chrome=1 + X-Xss-Protection: + - 1; mode=block + body: + encoding: UTF-8 + string: '{"token_type":"bearer","access_token":"AAAAAAAAAAAAAAAAAAAAAPV7eAAAAAAAN7q56yJ8wNHhsagDn06qiJ0Io00%3DfdvXQaVKHFS3q1hd3y8fVQdIbntIHN2iTsBTk0f6jQK7lxcDo5"}' + http_version: + recorded_at: Tue, 13 Sep 2016 01:01:46 GMT +- request: + method: get + uri: https://api.twitter.com/1.1/statuses/show/567054278486151168.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - TwitterRubyGem/5.14.0 + Authorization: + - Bearer AAAAAAAAAAAAAAAAAAAAAPV7eAAAAAAAN7q56yJ8wNHhsagDn06qiJ0Io00%3DfdvXQaVKHFS3q1hd3y8fVQdIbntIHN2iTsBTk0f6jQK7lxcDo5 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, no-store, must-revalidate, pre-check=0, post-check=0 + Content-Disposition: + - attachment; filename=json.json + Content-Length: + - '1351' + Content-Type: + - application/json;charset=utf-8 + Date: + - Tue, 13 Sep 2016 01:01:46 GMT + Expires: + - Tue, 31 Mar 1981 05:00:00 GMT + Last-Modified: + - Tue, 13 Sep 2016 01:01:46 GMT + Pragma: + - no-cache + Server: + - tsa_a + Set-Cookie: + - guest_id=v1%3A147372850640760084; Domain=.twitter.com; Path=/; Expires=Thu, + 13-Sep-2018 01:01:46 UTC + Status: + - 200 OK + Strict-Transport-Security: + - max-age=631138519 + X-Access-Level: + - read + X-Connection-Hash: + - 7383a927cdf3c21b6b1e7b97cc8f3087 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Rate-Limit-Limit: + - '180' + X-Rate-Limit-Remaining: + - '179' + X-Rate-Limit-Reset: + - '1473729406' + X-Response-Time: + - '97' + X-Transaction: + - 0023476800d5b98a + X-Twitter-Response-Tags: + - BouncerCompliant + X-Xss-Protection: + - 1; mode=block + body: + encoding: UTF-8 + string: '{"created_at":"Sun Feb 15 20:14:10 +0000 2015","id":567054278486151168,"id_str":"567054278486151168","text":"Those + are the same person. #CrossAnge http:\/\/t.co\/zX5p4AOUoA","truncated":false,"entities":{"hashtags":[{"text":"CrossAnge","indices":[27,37]}],"symbols":[],"user_mentions":[],"urls":[],"media":[{"id":567054271943016448,"id_str":"567054271943016448","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":338,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}}]},"extended_entities":{"media":[{"id":567054271943016448,"id_str":"567054271943016448","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":338,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}},{"id":567054271989182465,"id_str":"567054271989182465","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2yJIcAEKsHw.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2yJIcAEKsHw.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"large":{"w":1024,"h":576,"resize":"fit"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":338,"resize":"fit"},"thumb":{"w":150,"h":150,"resize":"crop"}}}]},"source":"\u003ca + href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003eTwitter Web Client\u003c\/a\u003e","in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":68692042,"id_str":"68692042","name":"lvlln","screen_name":"lvlln","location":"Arlington, + MA","description":"Just a quant who enjoys anime and video games and ultimate. + Blogs on Metanorn. I help to run http:\/\/t.co\/ilgVSv62tc","url":"http:\/\/t.co\/NXLDfpT1OT","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/NXLDfpT1OT","expanded_url":"http:\/\/metanorn.net","display_url":"metanorn.net","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/ilgVSv62tc","expanded_url":"http:\/\/mirroredanimescreenshots.tumblr.com","display_url":"mirroredanimescreenshots.tumblr.com","indices":[93,115]}]}},"protected":false,"followers_count":1092,"friends_count":1118,"listed_count":70,"created_at":"Tue + Aug 25 13:28:39 +0000 2009","favourites_count":15496,"utc_offset":-14400,"time_zone":"Eastern + Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":83655,"lang":"en","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/537958726\/540597.jpg","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/537958726\/540597.jpg","profile_background_tile":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/2631613491\/3b689e982e21419870a31c4cd4205a03_normal.jpeg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/2631613491\/3b689e982e21419870a31c4cd4205a03_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/68692042\/1399737095","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"has_extended_profile":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"is_quote_status":false,"retweet_count":28,"favorite_count":23,"favorited":false,"retweeted":false,"possibly_sensitive":false,"possibly_sensitive_appealable":false,"lang":"en"}' + http_version: + recorded_at: Tue, 13 Sep 2016 01:01:46 GMT +- request: + method: post + uri: https://SENSITIVE:SENSITIVE@api.twitter.com/oauth2/token + body: + encoding: UTF-8 + string: grant_type=client_credentials + headers: + Accept: + - "*/*" + User-Agent: + - TwitterRubyGem/5.14.0 + Content-Type: + - application/x-www-form-urlencoded; charset=UTF-8 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, no-store, must-revalidate, pre-check=0, post-check=0 + Content-Disposition: + - attachment; filename=json.json + Content-Length: + - '151' + Content-Type: + - application/json;charset=utf-8 + Date: + - Tue, 13 Sep 2016 01:01:46 GMT + Expires: + - Tue, 31 Mar 1981 05:00:00 GMT + Last-Modified: + - Tue, 13 Sep 2016 01:01:46 GMT + Ml: + - S + Pragma: + - no-cache + Server: + - tsa_a + Set-Cookie: + - guest_id=v1%3A147372850655007762; Domain=.twitter.com; Path=/; Expires=Thu, + 13-Sep-2018 01:01:46 UTC + Status: + - 200 OK + Strict-Transport-Security: + - max-age=631138519 + X-Connection-Hash: + - b0b7c2f5d0e6e5effa00c73e2260765e + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Response-Time: + - '16' + X-Transaction: + - 0079ec7b00fbdc48 + X-Tsa-Request-Body-Time: + - '0' + X-Twitter-Response-Tags: + - BouncerCompliant + X-Ua-Compatible: + - IE=edge,chrome=1 + X-Xss-Protection: + - 1; mode=block + body: + encoding: UTF-8 + string: '{"token_type":"bearer","access_token":"AAAAAAAAAAAAAAAAAAAAAPV7eAAAAAAAN7q56yJ8wNHhsagDn06qiJ0Io00%3DfdvXQaVKHFS3q1hd3y8fVQdIbntIHN2iTsBTk0f6jQK7lxcDo5"}' + http_version: + recorded_at: Tue, 13 Sep 2016 01:01:46 GMT +- request: + method: get + uri: https://api.twitter.com/1.1/statuses/show/567054278486151168.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - TwitterRubyGem/5.14.0 + Authorization: + - Bearer AAAAAAAAAAAAAAAAAAAAAPV7eAAAAAAAN7q56yJ8wNHhsagDn06qiJ0Io00%3DfdvXQaVKHFS3q1hd3y8fVQdIbntIHN2iTsBTk0f6jQK7lxcDo5 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, no-store, must-revalidate, pre-check=0, post-check=0 + Content-Disposition: + - attachment; filename=json.json + Content-Length: + - '1351' + Content-Type: + - application/json;charset=utf-8 + Date: + - Tue, 13 Sep 2016 01:01:46 GMT + Expires: + - Tue, 31 Mar 1981 05:00:00 GMT + Last-Modified: + - Tue, 13 Sep 2016 01:01:46 GMT + Pragma: + - no-cache + Server: + - tsa_a + Set-Cookie: + - guest_id=v1%3A147372850662042158; Domain=.twitter.com; Path=/; Expires=Thu, + 13-Sep-2018 01:01:46 UTC + Status: + - 200 OK + Strict-Transport-Security: + - max-age=631138519 + X-Access-Level: + - read + X-Connection-Hash: + - 9c44a8660405548d48d99e3c06d6dbf4 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Rate-Limit-Limit: + - '180' + X-Rate-Limit-Remaining: + - '178' + X-Rate-Limit-Reset: + - '1473729406' + X-Response-Time: + - '17' + X-Transaction: + - 003a5eae0013ca1c + X-Twitter-Response-Tags: + - BouncerCompliant + X-Xss-Protection: + - 1; mode=block + body: + encoding: UTF-8 + string: '{"created_at":"Sun Feb 15 20:14:10 +0000 2015","id":567054278486151168,"id_str":"567054278486151168","text":"Those + are the same person. #CrossAnge http:\/\/t.co\/zX5p4AOUoA","truncated":false,"entities":{"hashtags":[{"text":"CrossAnge","indices":[27,37]}],"symbols":[],"user_mentions":[],"urls":[],"media":[{"id":567054271943016448,"id_str":"567054271943016448","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":338,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}}]},"extended_entities":{"media":[{"id":567054271943016448,"id_str":"567054271943016448","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":338,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}},{"id":567054271989182465,"id_str":"567054271989182465","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2yJIcAEKsHw.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2yJIcAEKsHw.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"large":{"w":1024,"h":576,"resize":"fit"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":338,"resize":"fit"},"thumb":{"w":150,"h":150,"resize":"crop"}}}]},"source":"\u003ca + href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003eTwitter Web Client\u003c\/a\u003e","in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":68692042,"id_str":"68692042","name":"lvlln","screen_name":"lvlln","location":"Arlington, + MA","description":"Just a quant who enjoys anime and video games and ultimate. + Blogs on Metanorn. I help to run http:\/\/t.co\/ilgVSv62tc","url":"http:\/\/t.co\/NXLDfpT1OT","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/NXLDfpT1OT","expanded_url":"http:\/\/metanorn.net","display_url":"metanorn.net","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/ilgVSv62tc","expanded_url":"http:\/\/mirroredanimescreenshots.tumblr.com","display_url":"mirroredanimescreenshots.tumblr.com","indices":[93,115]}]}},"protected":false,"followers_count":1092,"friends_count":1118,"listed_count":70,"created_at":"Tue + Aug 25 13:28:39 +0000 2009","favourites_count":15496,"utc_offset":-14400,"time_zone":"Eastern + Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":83655,"lang":"en","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/537958726\/540597.jpg","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/537958726\/540597.jpg","profile_background_tile":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/2631613491\/3b689e982e21419870a31c4cd4205a03_normal.jpeg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/2631613491\/3b689e982e21419870a31c4cd4205a03_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/68692042\/1399737095","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"has_extended_profile":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"is_quote_status":false,"retweet_count":28,"favorite_count":23,"favorited":false,"retweeted":false,"possibly_sensitive":false,"possibly_sensitive_appealable":false,"lang":"en"}' + http_version: + recorded_at: Tue, 13 Sep 2016 01:01:46 GMT +- request: + method: post + uri: https://SENSITIVE:SENSITIVE@api.twitter.com/oauth2/token + body: + encoding: UTF-8 + string: grant_type=client_credentials + headers: + Accept: + - "*/*" + User-Agent: + - TwitterRubyGem/5.14.0 + Content-Type: + - application/x-www-form-urlencoded; charset=UTF-8 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, no-store, must-revalidate, pre-check=0, post-check=0 + Content-Disposition: + - attachment; filename=json.json + Content-Length: + - '151' + Content-Type: + - application/json;charset=utf-8 + Date: + - Tue, 13 Sep 2016 01:01:46 GMT + Expires: + - Tue, 31 Mar 1981 05:00:00 GMT + Last-Modified: + - Tue, 13 Sep 2016 01:01:46 GMT + Ml: + - S + Pragma: + - no-cache + Server: + - tsa_a + Set-Cookie: + - guest_id=v1%3A147372850668675128; Domain=.twitter.com; Path=/; Expires=Thu, + 13-Sep-2018 01:01:46 UTC + Status: + - 200 OK + Strict-Transport-Security: + - max-age=631138519 + X-Connection-Hash: + - 565105c101451372b0e65c5053580b49 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Response-Time: + - '15' + X-Transaction: + - 0017a4c100f7ea27 + X-Tsa-Request-Body-Time: + - '0' + X-Twitter-Response-Tags: + - BouncerCompliant + X-Ua-Compatible: + - IE=edge,chrome=1 + X-Xss-Protection: + - 1; mode=block + body: + encoding: UTF-8 + string: '{"token_type":"bearer","access_token":"AAAAAAAAAAAAAAAAAAAAAPV7eAAAAAAAN7q56yJ8wNHhsagDn06qiJ0Io00%3DfdvXQaVKHFS3q1hd3y8fVQdIbntIHN2iTsBTk0f6jQK7lxcDo5"}' + http_version: + recorded_at: Tue, 13 Sep 2016 01:01:46 GMT +- request: + method: get + uri: https://api.twitter.com/1.1/statuses/show/567054278486151168.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - TwitterRubyGem/5.14.0 + Authorization: + - Bearer AAAAAAAAAAAAAAAAAAAAAPV7eAAAAAAAN7q56yJ8wNHhsagDn06qiJ0Io00%3DfdvXQaVKHFS3q1hd3y8fVQdIbntIHN2iTsBTk0f6jQK7lxcDo5 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, no-store, must-revalidate, pre-check=0, post-check=0 + Content-Disposition: + - attachment; filename=json.json + Content-Length: + - '1351' + Content-Type: + - application/json;charset=utf-8 + Date: + - Tue, 13 Sep 2016 01:01:46 GMT + Expires: + - Tue, 31 Mar 1981 05:00:00 GMT + Last-Modified: + - Tue, 13 Sep 2016 01:01:46 GMT + Pragma: + - no-cache + Server: + - tsa_a + Set-Cookie: + - guest_id=v1%3A147372850675673755; Domain=.twitter.com; Path=/; Expires=Thu, + 13-Sep-2018 01:01:46 UTC + Status: + - 200 OK + Strict-Transport-Security: + - max-age=631138519 + X-Access-Level: + - read + X-Connection-Hash: + - b3cb54244a2b0520fac4e25e2002f7c8 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Rate-Limit-Limit: + - '180' + X-Rate-Limit-Remaining: + - '177' + X-Rate-Limit-Reset: + - '1473729406' + X-Response-Time: + - '23' + X-Transaction: + - 008c961900cc243b + X-Twitter-Response-Tags: + - BouncerCompliant + X-Xss-Protection: + - 1; mode=block + body: + encoding: UTF-8 + string: '{"created_at":"Sun Feb 15 20:14:10 +0000 2015","id":567054278486151168,"id_str":"567054278486151168","text":"Those + are the same person. #CrossAnge http:\/\/t.co\/zX5p4AOUoA","truncated":false,"entities":{"hashtags":[{"text":"CrossAnge","indices":[27,37]}],"symbols":[],"user_mentions":[],"urls":[],"media":[{"id":567054271943016448,"id_str":"567054271943016448","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":338,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}}]},"extended_entities":{"media":[{"id":567054271943016448,"id_str":"567054271943016448","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2x-IAAAR-ih.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"thumb":{"w":150,"h":150,"resize":"crop"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":338,"resize":"fit"},"large":{"w":1024,"h":576,"resize":"fit"}}},{"id":567054271989182465,"id_str":"567054271989182465","indices":[38,60],"media_url":"http:\/\/pbs.twimg.com\/media\/B96U2yJIcAEKsHw.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B96U2yJIcAEKsHw.jpg","url":"http:\/\/t.co\/zX5p4AOUoA","display_url":"pic.twitter.com\/zX5p4AOUoA","expanded_url":"http:\/\/twitter.com\/lvlln\/status\/567054278486151168\/photo\/1","type":"photo","sizes":{"large":{"w":1024,"h":576,"resize":"fit"},"small":{"w":340,"h":191,"resize":"fit"},"medium":{"w":600,"h":338,"resize":"fit"},"thumb":{"w":150,"h":150,"resize":"crop"}}}]},"source":"\u003ca + href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003eTwitter Web Client\u003c\/a\u003e","in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":68692042,"id_str":"68692042","name":"lvlln","screen_name":"lvlln","location":"Arlington, + MA","description":"Just a quant who enjoys anime and video games and ultimate. + Blogs on Metanorn. I help to run http:\/\/t.co\/ilgVSv62tc","url":"http:\/\/t.co\/NXLDfpT1OT","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/NXLDfpT1OT","expanded_url":"http:\/\/metanorn.net","display_url":"metanorn.net","indices":[0,22]}]},"description":{"urls":[{"url":"http:\/\/t.co\/ilgVSv62tc","expanded_url":"http:\/\/mirroredanimescreenshots.tumblr.com","display_url":"mirroredanimescreenshots.tumblr.com","indices":[93,115]}]}},"protected":false,"followers_count":1092,"friends_count":1118,"listed_count":70,"created_at":"Tue + Aug 25 13:28:39 +0000 2009","favourites_count":15496,"utc_offset":-14400,"time_zone":"Eastern + Time (US & Canada)","geo_enabled":true,"verified":false,"statuses_count":83655,"lang":"en","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"C0DEED","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/537958726\/540597.jpg","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/537958726\/540597.jpg","profile_background_tile":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/2631613491\/3b689e982e21419870a31c4cd4205a03_normal.jpeg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/2631613491\/3b689e982e21419870a31c4cd4205a03_normal.jpeg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/68692042\/1399737095","profile_link_color":"0084B4","profile_sidebar_border_color":"C0DEED","profile_sidebar_fill_color":"DDEEF6","profile_text_color":"333333","profile_use_background_image":true,"has_extended_profile":false,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"is_quote_status":false,"retweet_count":28,"favorite_count":23,"favorited":false,"retweeted":false,"possibly_sensitive":false,"possibly_sensitive_appealable":false,"lang":"en"}' + http_version: + recorded_at: Tue, 13 Sep 2016 01:01:46 GMT +recorded_with: VCR 2.9.3 diff --git a/test/fixtures/vcr_cassettes/upload-new-twitter.yml b/test/fixtures/vcr_cassettes/upload-new-twitter.yml new file mode 100644 index 000000000..be346dca3 --- /dev/null +++ b/test/fixtures/vcr_cassettes/upload-new-twitter.yml @@ -0,0 +1,348 @@ +--- +http_interactions: +- request: + method: post + uri: https://SENSITIVE:SENSITIVE@api.twitter.com/oauth2/token + body: + encoding: UTF-8 + string: grant_type=client_credentials + headers: + Accept: + - "*/*" + User-Agent: + - TwitterRubyGem/5.14.0 + Content-Type: + - application/x-www-form-urlencoded; charset=UTF-8 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, no-store, must-revalidate, pre-check=0, post-check=0 + Content-Disposition: + - attachment; filename=json.json + Content-Length: + - '151' + Content-Type: + - application/json;charset=utf-8 + Date: + - Tue, 13 Sep 2016 01:01:55 GMT + Expires: + - Tue, 31 Mar 1981 05:00:00 GMT + Last-Modified: + - Tue, 13 Sep 2016 01:01:55 GMT + Ml: + - S + Pragma: + - no-cache + Server: + - tsa_a + Set-Cookie: + - guest_id=v1%3A147372851593704313; Domain=.twitter.com; Path=/; Expires=Thu, + 13-Sep-2018 01:01:55 UTC + Status: + - 200 OK + Strict-Transport-Security: + - max-age=631138519 + X-Connection-Hash: + - 4a0ca8c6f3d8bdd03e9f9325b3f5ca15 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Response-Time: + - '21' + X-Transaction: + - 00d5f4cc0033d783 + X-Tsa-Request-Body-Time: + - '1' + X-Twitter-Response-Tags: + - BouncerCompliant + X-Ua-Compatible: + - IE=edge,chrome=1 + X-Xss-Protection: + - 1; mode=block + body: + encoding: UTF-8 + string: '{"token_type":"bearer","access_token":"AAAAAAAAAAAAAAAAAAAAAPV7eAAAAAAAN7q56yJ8wNHhsagDn06qiJ0Io00%3DfdvXQaVKHFS3q1hd3y8fVQdIbntIHN2iTsBTk0f6jQK7lxcDo5"}' + http_version: + recorded_at: Tue, 13 Sep 2016 01:01:55 GMT +- request: + method: get + uri: https://api.twitter.com/1.1/statuses/show/566030116182949888.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - TwitterRubyGem/5.14.0 + Authorization: + - Bearer AAAAAAAAAAAAAAAAAAAAAPV7eAAAAAAAN7q56yJ8wNHhsagDn06qiJ0Io00%3DfdvXQaVKHFS3q1hd3y8fVQdIbntIHN2iTsBTk0f6jQK7lxcDo5 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, no-store, must-revalidate, pre-check=0, post-check=0 + Content-Disposition: + - attachment; filename=json.json + Content-Length: + - '1304' + Content-Type: + - application/json;charset=utf-8 + Date: + - Tue, 13 Sep 2016 01:01:56 GMT + Expires: + - Tue, 31 Mar 1981 05:00:00 GMT + Last-Modified: + - Tue, 13 Sep 2016 01:01:56 GMT + Pragma: + - no-cache + Server: + - tsa_a + Set-Cookie: + - guest_id=v1%3A147372851601319154; Domain=.twitter.com; Path=/; Expires=Thu, + 13-Sep-2018 01:01:56 UTC + Status: + - 200 OK + Strict-Transport-Security: + - max-age=631138519 + X-Access-Level: + - read + X-Connection-Hash: + - 4bc3bbdcec0948960a93cfec42a2f3f9 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Rate-Limit-Limit: + - '180' + X-Rate-Limit-Remaining: + - '176' + X-Rate-Limit-Reset: + - '1473729406' + X-Response-Time: + - '37' + X-Transaction: + - 008ccf5300a5bcd0 + X-Twitter-Response-Tags: + - BouncerCompliant + X-Xss-Protection: + - 1; mode=block + body: + encoding: UTF-8 + string: '{"created_at":"Fri Feb 13 00:24:30 +0000 2015","id":566030116182949888,"id_str":"566030116182949888","text":"What + do you give the Caramel Frappuccino that already has everything? The gift + of mocha drizzle. http:\/\/t.co\/2MWtXbYhf0","truncated":false,"entities":{"hashtags":[],"symbols":[],"user_mentions":[],"urls":[],"media":[{"id":566030112210972672,"id_str":"566030112210972672","indices":[97,119],"media_url":"http:\/\/pbs.twimg.com\/media\/B9rxY1qCcAAbeo0.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B9rxY1qCcAAbeo0.jpg","url":"http:\/\/t.co\/2MWtXbYhf0","display_url":"pic.twitter.com\/2MWtXbYhf0","expanded_url":"http:\/\/twitter.com\/frappuccino\/status\/566030116182949888\/photo\/1","type":"photo","sizes":{"medium":{"w":600,"h":338,"resize":"fit"},"thumb":{"w":150,"h":150,"resize":"crop"},"large":{"w":1024,"h":576,"resize":"fit"},"small":{"w":340,"h":191,"resize":"fit"}}}]},"extended_entities":{"media":[{"id":566030112210972672,"id_str":"566030112210972672","indices":[97,119],"media_url":"http:\/\/pbs.twimg.com\/media\/B9rxY1qCcAAbeo0.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B9rxY1qCcAAbeo0.jpg","url":"http:\/\/t.co\/2MWtXbYhf0","display_url":"pic.twitter.com\/2MWtXbYhf0","expanded_url":"http:\/\/twitter.com\/frappuccino\/status\/566030116182949888\/photo\/1","type":"photo","sizes":{"medium":{"w":600,"h":338,"resize":"fit"},"thumb":{"w":150,"h":150,"resize":"crop"},"large":{"w":1024,"h":576,"resize":"fit"},"small":{"w":340,"h":191,"resize":"fit"}}}]},"source":"\u003ca + href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter + for iPhone\u003c\/a\u003e","in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":127566622,"id_str":"127566622","name":"Frappuccino","screen_name":"frappuccino","location":"Seattle, + WA","description":"Welcome to the world of Frappuccino, where clouds are made + of whipped cream and the unicorns are also made of whipped cream.","url":"http:\/\/t.co\/IMpYYlzhTQ","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/IMpYYlzhTQ","expanded_url":"http:\/\/frappuccino.com","display_url":"frappuccino.com","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":210476,"friends_count":65643,"listed_count":758,"created_at":"Mon + Mar 29 16:30:39 +0000 2010","favourites_count":4739,"utc_offset":-25200,"time_zone":"Pacific + Time (US & Canada)","geo_enabled":true,"verified":true,"statuses_count":20821,"lang":"en","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"9AE4E8","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/486908690591535104\/roRpLqRU.jpeg","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/486908690591535104\/roRpLqRU.jpeg","profile_background_tile":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/773539286843031552\/1XcEcAKR_normal.jpg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/773539286843031552\/1XcEcAKR_normal.jpg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/127566622\/1469718632","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDFFCC","profile_text_color":"333333","profile_use_background_image":true,"has_extended_profile":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"is_quote_status":false,"retweet_count":596,"favorite_count":2273,"favorited":false,"retweeted":false,"possibly_sensitive":false,"possibly_sensitive_appealable":false,"lang":"en"}' + http_version: + recorded_at: Tue, 13 Sep 2016 01:01:56 GMT +- request: + method: post + uri: https://SENSITIVE:SENSITIVE@api.twitter.com/oauth2/token + body: + encoding: UTF-8 + string: grant_type=client_credentials + headers: + Accept: + - "*/*" + User-Agent: + - TwitterRubyGem/5.14.0 + Content-Type: + - application/x-www-form-urlencoded; charset=UTF-8 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, no-store, must-revalidate, pre-check=0, post-check=0 + Content-Disposition: + - attachment; filename=json.json + Content-Length: + - '151' + Content-Type: + - application/json;charset=utf-8 + Date: + - Tue, 13 Sep 2016 01:01:56 GMT + Expires: + - Tue, 31 Mar 1981 05:00:00 GMT + Last-Modified: + - Tue, 13 Sep 2016 01:01:56 GMT + Ml: + - S + Pragma: + - no-cache + Server: + - tsa_a + Set-Cookie: + - guest_id=v1%3A147372851610012587; Domain=.twitter.com; Path=/; Expires=Thu, + 13-Sep-2018 01:01:56 UTC + Status: + - 200 OK + Strict-Transport-Security: + - max-age=631138519 + X-Connection-Hash: + - cfe54b3f69033399866eed80f27aa28b + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - DENY + X-Response-Time: + - '24' + X-Transaction: + - 00c09ae10031722e + X-Tsa-Request-Body-Time: + - '0' + X-Twitter-Response-Tags: + - BouncerCompliant + X-Ua-Compatible: + - IE=edge,chrome=1 + X-Xss-Protection: + - 1; mode=block + body: + encoding: UTF-8 + string: '{"token_type":"bearer","access_token":"AAAAAAAAAAAAAAAAAAAAAPV7eAAAAAAAN7q56yJ8wNHhsagDn06qiJ0Io00%3DfdvXQaVKHFS3q1hd3y8fVQdIbntIHN2iTsBTk0f6jQK7lxcDo5"}' + http_version: + recorded_at: Tue, 13 Sep 2016 01:01:56 GMT +- request: + method: get + uri: https://api.twitter.com/1.1/statuses/show/566030116182949888.json + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/json + User-Agent: + - TwitterRubyGem/5.14.0 + Authorization: + - Bearer AAAAAAAAAAAAAAAAAAAAAPV7eAAAAAAAN7q56yJ8wNHhsagDn06qiJ0Io00%3DfdvXQaVKHFS3q1hd3y8fVQdIbntIHN2iTsBTk0f6jQK7lxcDo5 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + response: + status: + code: 200 + message: OK + headers: + Cache-Control: + - no-cache, no-store, must-revalidate, pre-check=0, post-check=0 + Content-Disposition: + - attachment; filename=json.json + Content-Length: + - '1304' + Content-Type: + - application/json;charset=utf-8 + Date: + - Tue, 13 Sep 2016 01:01:56 GMT + Expires: + - Tue, 31 Mar 1981 05:00:00 GMT + Last-Modified: + - Tue, 13 Sep 2016 01:01:56 GMT + Pragma: + - no-cache + Server: + - tsa_a + Set-Cookie: + - guest_id=v1%3A147372851617286179; Domain=.twitter.com; Path=/; Expires=Thu, + 13-Sep-2018 01:01:56 UTC + Status: + - 200 OK + Strict-Transport-Security: + - max-age=631138519 + X-Access-Level: + - read + X-Connection-Hash: + - 59476c5c096a181e06a5d2c691b4d0b9 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Rate-Limit-Limit: + - '180' + X-Rate-Limit-Remaining: + - '175' + X-Rate-Limit-Reset: + - '1473729406' + X-Response-Time: + - '20' + X-Transaction: + - 0071a99b0020b635 + X-Twitter-Response-Tags: + - BouncerCompliant + X-Xss-Protection: + - 1; mode=block + body: + encoding: UTF-8 + string: '{"created_at":"Fri Feb 13 00:24:30 +0000 2015","id":566030116182949888,"id_str":"566030116182949888","text":"What + do you give the Caramel Frappuccino that already has everything? The gift + of mocha drizzle. http:\/\/t.co\/2MWtXbYhf0","truncated":false,"entities":{"hashtags":[],"symbols":[],"user_mentions":[],"urls":[],"media":[{"id":566030112210972672,"id_str":"566030112210972672","indices":[97,119],"media_url":"http:\/\/pbs.twimg.com\/media\/B9rxY1qCcAAbeo0.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B9rxY1qCcAAbeo0.jpg","url":"http:\/\/t.co\/2MWtXbYhf0","display_url":"pic.twitter.com\/2MWtXbYhf0","expanded_url":"http:\/\/twitter.com\/frappuccino\/status\/566030116182949888\/photo\/1","type":"photo","sizes":{"medium":{"w":600,"h":338,"resize":"fit"},"thumb":{"w":150,"h":150,"resize":"crop"},"large":{"w":1024,"h":576,"resize":"fit"},"small":{"w":340,"h":191,"resize":"fit"}}}]},"extended_entities":{"media":[{"id":566030112210972672,"id_str":"566030112210972672","indices":[97,119],"media_url":"http:\/\/pbs.twimg.com\/media\/B9rxY1qCcAAbeo0.jpg","media_url_https":"https:\/\/pbs.twimg.com\/media\/B9rxY1qCcAAbeo0.jpg","url":"http:\/\/t.co\/2MWtXbYhf0","display_url":"pic.twitter.com\/2MWtXbYhf0","expanded_url":"http:\/\/twitter.com\/frappuccino\/status\/566030116182949888\/photo\/1","type":"photo","sizes":{"medium":{"w":600,"h":338,"resize":"fit"},"thumb":{"w":150,"h":150,"resize":"crop"},"large":{"w":1024,"h":576,"resize":"fit"},"small":{"w":340,"h":191,"resize":"fit"}}}]},"source":"\u003ca + href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter + for iPhone\u003c\/a\u003e","in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":127566622,"id_str":"127566622","name":"Frappuccino","screen_name":"frappuccino","location":"Seattle, + WA","description":"Welcome to the world of Frappuccino, where clouds are made + of whipped cream and the unicorns are also made of whipped cream.","url":"http:\/\/t.co\/IMpYYlzhTQ","entities":{"url":{"urls":[{"url":"http:\/\/t.co\/IMpYYlzhTQ","expanded_url":"http:\/\/frappuccino.com","display_url":"frappuccino.com","indices":[0,22]}]},"description":{"urls":[]}},"protected":false,"followers_count":210476,"friends_count":65643,"listed_count":758,"created_at":"Mon + Mar 29 16:30:39 +0000 2010","favourites_count":4739,"utc_offset":-25200,"time_zone":"Pacific + Time (US & Canada)","geo_enabled":true,"verified":true,"statuses_count":20821,"lang":"en","contributors_enabled":false,"is_translator":false,"is_translation_enabled":false,"profile_background_color":"9AE4E8","profile_background_image_url":"http:\/\/pbs.twimg.com\/profile_background_images\/486908690591535104\/roRpLqRU.jpeg","profile_background_image_url_https":"https:\/\/pbs.twimg.com\/profile_background_images\/486908690591535104\/roRpLqRU.jpeg","profile_background_tile":true,"profile_image_url":"http:\/\/pbs.twimg.com\/profile_images\/773539286843031552\/1XcEcAKR_normal.jpg","profile_image_url_https":"https:\/\/pbs.twimg.com\/profile_images\/773539286843031552\/1XcEcAKR_normal.jpg","profile_banner_url":"https:\/\/pbs.twimg.com\/profile_banners\/127566622\/1469718632","profile_link_color":"0084B4","profile_sidebar_border_color":"FFFFFF","profile_sidebar_fill_color":"DDFFCC","profile_text_color":"333333","profile_use_background_image":true,"has_extended_profile":true,"default_profile":false,"default_profile_image":false,"following":null,"follow_request_sent":null,"notifications":null},"geo":null,"coordinates":null,"place":null,"contributors":null,"is_quote_status":false,"retweet_count":596,"favorite_count":2273,"favorited":false,"retweeted":false,"possibly_sensitive":false,"possibly_sensitive_appealable":false,"lang":"en"}' + http_version: + recorded_at: Tue, 13 Sep 2016 01:01:56 GMT +- request: + method: head + uri: http://pbs.twimg.com/media/B9rxY1qCcAAbeo0.jpg:orig + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - dior/2.105.0 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Access-Control-Allow-Origin: + - "*" + Content-Md5: + - owAkLGZeD7NZTChJ3z0/EA== + Content-Type: + - image/jpeg + Date: + - Tue, 13 Sep 2016 01:01:56 GMT + Last-Modified: + - Fri, 13 Feb 2015 00:24:29 GMT + Server: + - ECS (sjc/4E32) + Surrogate-Key: + - media media/bucket/8 media/566030112210972672 + X-Cache: + - MISS + X-Connection-Hash: + - 6775721ebf0dd903c3a06b1bee4290f3 + X-Content-Type-Options: + - nosniff + X-Response-Time: + - '36' + Content-Length: + - '56808' + body: + encoding: UTF-8 + string: '' + http_version: + recorded_at: Tue, 13 Sep 2016 01:01:56 GMT +recorded_with: VCR 2.9.3 diff --git a/test/functional/bulk_update_requests_controller_test.rb b/test/functional/bulk_update_requests_controller_test.rb index 6b30cb058..ab8d211f0 100644 --- a/test/functional/bulk_update_requests_controller_test.rb +++ b/test/functional/bulk_update_requests_controller_test.rb @@ -32,7 +32,7 @@ class BulkUpdateRequestsControllerTest < ActionController::TestCase should "still handle enabled secondary validations correctly" do post :update, {:id => @bulk_update_request.id, :bulk_update_request => {:script => "create alias zzz -> 222", :skip_secondary_validations => "0"}}, {:user_id => @user.id} @bulk_update_request.reload - assert_equal("create alias aaa -> bbb", @bulk_update_request.script) + assert_equal("create alias zzz -> 222", @bulk_update_request.script) end should "still handle disabled secondary validations correctly" do diff --git a/test/functional/tag_alias_requests_controller_test.rb b/test/functional/tag_alias_requests_controller_test.rb index fcb8b4f45..fa7fe89cb 100644 --- a/test/functional/tag_alias_requests_controller_test.rb +++ b/test/functional/tag_alias_requests_controller_test.rb @@ -25,7 +25,7 @@ class TagAliasRequestsControllerTest < ActionController::TestCase context "create action" do should "render" do assert_difference("ForumTopic.count", 1) do - post :create, {:tag_alias_request => {:antecedent_name => "aaa", :consequent_name => "bbb", :reason => "ccc"}}, {:user_id => @user.id} + post :create, {:tag_alias_request => {:antecedent_name => "aaa", :consequent_name => "bbb", :reason => "ccc", :skip_secondary_validations => true}}, {:user_id => @user.id} end assert_redirected_to(forum_topic_path(ForumTopic.last)) end diff --git a/test/functional/uploads_controller_test.rb b/test/functional/uploads_controller_test.rb index 5f0668fc3..5979be72a 100644 --- a/test/functional/uploads_controller_test.rb +++ b/test/functional/uploads_controller_test.rb @@ -20,8 +20,8 @@ class UploadsControllerTest < ActionController::TestCase context "batch action" do context "for twitter galleries" do - should "1234 render" do - VCR.use_cassette("functional/upload/twitter", :record => :once) do + should "render" do + VCR.use_cassette("functional/upload/twitter", :record => :none) do get :batch, {:url => "https://twitter.com/lvlln/status/567054278486151168"}, {:user_id => @user.id} end assert_response :success @@ -37,7 +37,7 @@ class UploadsControllerTest < ActionController::TestCase context "for a twitter post" do setup do - VCR.use_cassette("upload-new-twitter", :record => :once) do + VCR.use_cassette("upload-new-twitter", :record => :none) do get :new, {:url => "https://twitter.com/frappuccino/status/566030116182949888"}, {:user_id => @user.id} end end