Sha256: bd3cdf1fcdbcd94a5c93cc6e192cb63a177e6b8ad396889d02946398768ccbdf

Contents?: true

Size: 829 Bytes

Versions: 14

Compression:

Stored size: 829 Bytes

Contents

# frozen_string_literal: true

require "test_helper"

class InstagramTest < Minitest::Test
  test "detects instagram" do
    browser = Browser.new(Browser["INSTAGRAM"])

    assert_equal "Instagram", browser.name
    assert browser.instagram?
    assert :instagram, browser.id
    assert_equal "41.0.0.14.90", browser.full_version
    assert_equal "41", browser.version
  end

  test "detects alternate instagram user agent" do
    browser = Browser.new(Browser["INSTAGRAM_OTHER"])

    assert_equal "Instagram", browser.name
    assert browser.instagram?
    assert :instagram, browser.id
    assert_equal "182257141", browser.full_version
    assert_equal "182257141", browser.version
  end

  test "detects version by range" do
    browser = Browser.new(Browser["INSTAGRAM"])
    assert browser.instagram?(%w[>=41])
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
browser-5.3.1 test/unit/instagram_test.rb
browser-5.3.0 test/unit/instagram_test.rb
browser-5.2.0 test/unit/instagram_test.rb
browser-5.1.0 test/unit/instagram_test.rb
browser-5.0.0 test/unit/instagram_test.rb
browser-4.2.0 test/unit/instagram_test.rb
browser-4.1.0 test/unit/instagram_test.rb
browser-4.0.0 test/unit/instagram_test.rb
browser-3.0.3 test/unit/instagram_test.rb
browser-3.0.2 test/unit/instagram_test.rb
browser-3.0.1 test/unit/instagram_test.rb
browser-3.0.0 test/unit/instagram_test.rb
browser-2.7.1 test/unit/instagram_test.rb
browser-2.7.0 test/unit/instagram_test.rb