From e96d21ed7d2fce1d07fc381200d31919a2d93299 Mon Sep 17 00:00:00 2001 From: Azul Date: Thu, 6 Feb 2014 12:08:15 +0100 Subject: integration test with en-EN language Tests fail on machines that default to other available languages. Also move setting capybara driver to be javascript driver into the BrowserIntegrationTest. --- test/integration/os_detection_test.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'test/integration/os_detection_test.rb') diff --git a/test/integration/os_detection_test.rb b/test/integration/os_detection_test.rb index cb254aa..6d9a648 100644 --- a/test/integration/os_detection_test.rb +++ b/test/integration/os_detection_test.rb @@ -2,19 +2,15 @@ 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" } + page.driver.add_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" } + page.driver.add_headers "User-Agent" => "Android" visit '/' assert_selector "html.android" assert has_no_text? "not available" -- cgit v1.2.3