Sha256: aeb5c772997f2c0ee4d2d38e16bb3173ad6467a9d189510e37c15ec06cafcab6

Contents?: true

Size: 579 Bytes

Versions: 3

Compression:

Stored size: 579 Bytes

Contents

# frozen_string_literal: true

require_relative "../test_helper"

module Telnyx
  class MessageTest < Test::Unit::TestCase
    should "be retrievable" do
      message = Telnyx::Message.retrieve("123")
      assert_requested :get, "#{Telnyx.api_base}/v2/messages/123"
      assert message.is_a?(Telnyx::Message)
    end

    should "be creatable" do
      message = Telnyx::Message.create(to: "+18005554000", from: "+18005559000", text: "Hello, World!")
      assert_requested :post, "#{Telnyx.api_base}/v2/messages"
      assert message.is_a?(Telnyx::Message)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
telnyx-2.9.0 test/telnyx/message_test.rb
telnyx-2.8.0 test/telnyx/message_test.rb
telnyx-2.7.0 test/telnyx/message_test.rb