diff --git a/Gemfile.lock b/Gemfile.lock index e0d7c83a5..f8001333c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -18,7 +18,7 @@ GIT GIT remote: https://github.com/basecamp/useragent - revision: b253635dc649394c72b761f09234bfd6dc87516a + revision: 433ca320a42db1266c4b89df74d0abdb9a880c5e specs: useragent (0.16.11) diff --git a/test/controllers/allow_browser_test.rb b/test/controllers/allow_browser_test.rb index bb0e0b416..529caa840 100644 --- a/test/controllers/allow_browser_test.rb +++ b/test/controllers/allow_browser_test.rb @@ -51,4 +51,14 @@ class AllowBrowserTest < ActionDispatch::IntegrationTest assert_response :success end + + test "Facebook/Twitter bot is allowed" do + sign_in_as :kevin + + get cards_path, headers: { + "User-Agent" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/601.2.4 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.4 facebookexternalhit/1.1 Facebot Twitterbot/1.0" + } + + assert_response :success + end end