Sha256: 9873f3dd0611756542261d048f81b7c0f183c787fe33883bd956a4d3e4d45a41

Contents?: true

Size: 1.16 KB

Versions: 5

Compression:

Stored size: 1.16 KB

Contents

# frozen_string_literal: true

require_relative "../test_helper"

module Telnyx
  class DialogflowConnectionTest < Test::Unit::TestCase
    setup do
      @flow = DialogflowConnection.create(
        connection_id: "Foo",
        service_account:
                     { type: "service_account",
                       project_id: "your-project-id",
                       private_key_id: "your-private-key",
                       private_key: "-----BEGIN PRIVATE KEY-----n-----END PRIVATE",
                       client_email: "example@example.com", "client_id": "your-client-id",
                       auth_uri: "http://example.com", "token_uri": "http://example.com",
                       auth_provider_x509_cert_url: "http://example.com",
                       client_x509_cert_url: "http://example.com" }
      )
      @con_id = @flow.connection_id.gsub(/\s+/, "+").freeze
    end

    should "be creatable" do
      assert_requested :post, "#{Telnyx.api_base}/v2/dialogflow_connections/Foo"
    end

    should "be retrievable" do
      DialogflowConnection.retrieve(@con_id)
      assert_requested :get, "#{Telnyx.api_base}/v2/dialogflow_connections/#{@con_id}"
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
telnyx-3.0.5 test/telnyx/dialogflow_connection_test.rb
telnyx-3.0.4 test/telnyx/dialogflow_connection_test.rb
telnyx-3.0.3 test/telnyx/dialogflow_connection_test.rb
telnyx-3.0.2 test/telnyx/dialogflow_connection_test.rb
telnyx-3.0.0 test/telnyx/dialogflow_connection_test.rb