diff options
author | jessib <jessib@riseup.net> | 2013-10-15 11:10:31 -0700 |
---|---|---|
committer | jessib <jessib@riseup.net> | 2013-10-15 11:10:31 -0700 |
commit | a6f196d0bfe632408db7350829507478b825b1a8 (patch) | |
tree | ba2de17a08c11619a74a0be6cf4c3939a2b9f223 /test/integration/home_test.rb | |
parent | 0acbf6a158f149c1f4273bde0cfca47547e080f8 (diff) | |
parent | 8e5aa5093ab6e67db4f603a44bb7027245b91a21 (diff) |
Merge pull request #99 from azul/feature/os-detection
detect os in browser and show proper download link
Diffstat (limited to 'test/integration/home_test.rb')
-rw-r--r-- | test/integration/home_test.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/integration/home_test.rb b/test/integration/home_test.rb new file mode 100644 index 0000000..126a420 --- /dev/null +++ b/test/integration/home_test.rb @@ -0,0 +1,24 @@ +require 'test_helper' + +class AccountTest < 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 |