summaryrefslogtreecommitdiff
path: root/test/integration/os_detection_test.rb
diff options
context:
space:
mode:
authorjessib <jessib@riseup.net>2013-12-16 09:41:38 -0800
committerjessib <jessib@riseup.net>2013-12-16 09:41:38 -0800
commitdbb4030c87872550e03d1252ce2258f7cb1da6d9 (patch)
tree2028ea1c0aaf34d57834d39d44a4ffd314fb1a16 /test/integration/os_detection_test.rb
parente1d9d92d4afe32a6b4c267d9ffb7d8a40c4871e1 (diff)
parent72087656e5092fd744f4314c9a0e91825399fefc (diff)
Merge pull request #121 from azul/feature/robust-against-couch-connection-issues
Feature/robust against couch connection issues
Diffstat (limited to 'test/integration/os_detection_test.rb')
-rw-r--r--test/integration/os_detection_test.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/integration/os_detection_test.rb b/test/integration/os_detection_test.rb
new file mode 100644
index 0000000..cb254aa
--- /dev/null
+++ b/test/integration/os_detection_test.rb
@@ -0,0 +1,24 @@
+require 'test_helper'
+
+class OsDetectionTest < BrowserIntegrationTest
+
+ setup do
+ Capybara.current_driver = Capybara.javascript_driver
+ end
+
+ test "old windows shows deactivated download" do
+ page.driver.headers = { "User-Agent" => "Win98" }
+ visit '/'
+ assert_selector "html.oldwin"
+ assert has_text? "not available"
+ end
+
+ test "android shows android download" do
+ page.driver.headers = { "User-Agent" => "Android" }
+ visit '/'
+ assert_selector "html.android"
+ assert has_no_text? "not available"
+ assert_selector "small", text: "Android"
+ end
+
+end