summaryrefslogtreecommitdiff
path: root/test/integration/home_test.rb
blob: 126a420f682df37a91b212bea2c75c09fdcb1824 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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