Sha256: 0c76b510987715212193bb6529aa24f61e2839f30afbd9a3b4c137984313c79b

Contents?: true

Size: 947 Bytes

Versions: 8

Compression:

Stored size: 947 Bytes

Contents

# frozen_string_literal: true

require ::File.expand_path("../test_helper", __FILE__)

class TelnyxTest < Test::Unit::TestCase
  should "allow app_info to be configured" do
    old = Telnyx.app_info
    Telnyx.set_app_info(
      "MyAwesomePlugin",
      partner_id: "partner_1234",
      url: "https://myawesomeplugin.info",
      version: "1.2.34"
    )
    assert_equal({
      name: "MyAwesomePlugin",
      partner_id: "partner_1234",
      url: "https://myawesomeplugin.info",
      version: "1.2.34",
    }, Telnyx.app_info)
  ensure
    Telnyx.app_info = old
  end

  should "allow max_network_retries to be configured" do
    old = Telnyx.max_network_retries
    Telnyx.max_network_retries = 99
    assert_equal 99, Telnyx.max_network_retries
  ensure
    Telnyx.max_network_retries = old
  end

  should "have default open and read timeouts" do
    assert_equal Telnyx.open_timeout, 30
    assert_equal Telnyx.read_timeout, 80
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
telnyx-3.0.5 test/telnyx_test.rb
telnyx-3.0.4 test/telnyx_test.rb
telnyx-3.0.3 test/telnyx_test.rb
telnyx-3.0.2 test/telnyx_test.rb
telnyx-3.0.0 test/telnyx_test.rb
telnyx-2.9.0 test/telnyx_test.rb
telnyx-2.8.0 test/telnyx_test.rb
telnyx-2.7.0 test/telnyx_test.rb