Sha256: 6aaf45cd8f83d7187149721f408530c6d8b4aa2321c933afb23b8fc0c674c33d
Contents?: true
Size: 1.06 KB
Versions: 8
Compression:
Stored size: 1.06 KB
Contents
# frozen_string_literal: true require "test_helper" class DuckDuckGoTest < Minitest::Test test "detects DuckDuckGo on iOS device" do browser = Browser.new(Browser["DUCKDUCKGO_BROWSER_IOS"]) assert browser.duck_duck_go? refute browser.safari? refute browser.chrome? assert browser.webkit? refute browser.bot? assert_equal "DuckDuckGo", browser.name assert_equal :duckduckgo, browser.id end test "detects DuckDuckGo on Android device" do browser = Browser.new(Browser["DUCKDUCKGO_BROWSER_ANDROID"]) assert browser.duck_duck_go? refute browser.safari? refute browser.chrome? refute browser.bot? assert_equal "DuckDuckGo", browser.name assert_equal :duckduckgo, browser.id end test "detects correct version" do browser = Browser.new(Browser["DUCKDUCKGO_BROWSER_IOS"]) assert_equal "7", browser.full_version assert_equal "7", browser.version end test "detects version by range" do browser = Browser.new(Browser["DUCKDUCKGO_BROWSER_IOS"]) assert browser.duck_duck_go?(%w[>=7 <8]) end end
Version data entries
8 entries across 8 versions & 1 rubygems