Sha256: ff72b31092ecdf9591ea4fcb293189eaf594e057344ea4e34d9b06d7b18b52a0

Contents?: true

Size: 1.26 KB

Versions: 5

Compression:

Stored size: 1.26 KB

Contents

# frozen_string_literal: true

require_relative "../test_helper"

module Telnyx
  class NumberOrderDocumentTest < Test::Unit::TestCase
    should "be retrievable" do
      number_order_document = NumberOrderDocument.retrieve "12345"
      assert_requested :get, "#{Telnyx.api_base}/v2/number_order_documents/12345"
      assert_kind_of NumberOrderDocument, number_order_document
    end

    should "be creatable" do
      number_order_document = NumberOrderDocument.create
      assert_requested :post, "#{Telnyx.api_base}/v2/number_order_documents"
      assert_kind_of TelnyxObject, number_order_document
    end

    should "be listable" do
      number_order_documents = NumberOrderDocument.list
      assert_requested :get, "#{Telnyx.api_base}/v2/number_order_documents"
      assert_kind_of Array, number_order_documents.data
      assert_kind_of TelnyxObject, number_order_documents.first
    end

    should "be saveable" do
      number_order_document = NumberOrderDocument.retrieve("12345")
      number_order_document.file_id = "1234"
      id = number_order_document.id.freeze
      number_order_document.save
      assert_requested :patch, "#{Telnyx.api_base}/v2/number_order_documents/#{id}"
      assert_kind_of NumberOrderDocument, number_order_document
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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