Sha256: 7cc53ff986447f4cf163223d7423e98b473740bb3de0d5e0fbe904fdea507d09

Contents?: true

Size: 550 Bytes

Versions: 4

Compression:

Stored size: 550 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'

class PingMessageTest < Test::Unit::TestCase
  def test_create_message
    fake("api/ping-api/v1/conversations/123/messages",
      method: :post,
      body: load_fixture('ping/message'))

    message = ShopifyAPI::Ping::Message.new(
      dedupe_key: SecureRandom.uuid,
      content: {
        text: "Hello from shopify_api",
      },
      sender_id: 'test',
      conversation_id: '123',
    )

    message.save
    assert_equal("d0c7a2e6-8084-4e79-8483-e4a1352b81f7", message.id)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
shopify_api-6.0.0 test/ping/message_test.rb
shopify_api-5.2.4 test/ping/message_test.rb
shopify_api-5.2.3 test/ping/message_test.rb
shopify_api-5.2.2 test/ping/message_test.rb