Sha256: 9f01c71613d83b34369c6611e41bafc0ff8daf0b0cd39af9b7c6fdef5ab6186a

Contents?: true

Size: 828 Bytes

Versions: 1

Compression:

Stored size: 828 Bytes

Contents

require "test_helper"

class KindleTest < Minitest::Test
  setup do
    @browser = Browser.new
  end

  test "detects kindle monochrome" do
    @browser.ua = $ua["KINDLE"]

    assert @browser.kindle?
    assert @browser.webkit?
  end

  test "detects kindle fire" do
    @browser.ua = $ua["KINDLE_FIRE"]

    assert @browser.kindle?
    assert @browser.webkit?
  end

  test "detects kindle fire hd" do
    @browser.ua = $ua["KINDLE_FIRE_HD"]

    assert @browser.silk?
    assert @browser.kindle?
    assert @browser.webkit?
    assert @browser.modern?
    refute @browser.mobile?
  end

  test "detects kindle fire hd mobile" do
    @browser.ua = $ua["KINDLE_FIRE_HD_MOBILE"]

    assert @browser.silk?
    assert @browser.kindle?
    assert @browser.webkit?
    assert @browser.modern?
    assert @browser.mobile?
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
browser-1.1.0 test/unit/kindle_test.rb