Sha256: c402a68785770e017587c6378558dfff700e9d55c674cb13c7a0ed664420e359

Contents?: true

Size: 1.07 KB

Versions: 27

Compression:

Stored size: 1.07 KB

Contents

module Bot
  module Rspec
    module Syntax
      def incoming_message(from, options={})
        {
          "from" => from,
          "body" => "No Message",
          "readReceiptRequested" => true,
          "timestamp" => Time.now.to_i * 1000,
          "type" => "text",
          "id" => "07c6eb77-e01c-439a-80e7-3583dd784de1"
        }.merge(options.stringify_keys)
      end

      def incoming_scan(from, options={})
        {
          "from" => from,
          "timestamp" => 1457449114952,
          "data" => "{}",
          "mention" => nil,
          "participants" => [from],
          "readReceiptRequested" => false,
          "type" => "scan-data",
          "id" => "e6303158-ca60-4332-a600-236c5de4fedb",
          "chatId" => "d68a7ab10a1526ac9682b764e2784080bb1cb52fc82c8f9c10c7d0534741fc93"
        }.merge(options.stringify_keys)
      end

      def outgoing_message(to, options={})
        {
          "to" => to,
          "body" => "No Message",
          "type" => "text",
          "typeTime" => 0
        }.merge(options.stringify_keys)
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
bot-0.0.46 lib/bot/rspec/syntax.rb
bot-0.0.45 lib/bot/rspec/syntax.rb
bot-0.0.44 lib/bot/rspec/syntax.rb
bot-0.0.43 lib/bot/rspec/syntax.rb
bot-0.0.42 lib/bot/rspec/syntax.rb
bot-0.0.41 lib/bot/rspec/syntax.rb
bot-0.0.40 lib/bot/rspec/syntax.rb
bot-0.0.39 lib/bot/rspec/syntax.rb
bot-0.0.38 lib/bot/rspec/syntax.rb
bot-0.0.37 lib/bot/rspec/syntax.rb
bot-0.0.35 lib/bot/rspec/syntax.rb
bot-0.0.34 lib/bot/rspec/syntax.rb
bot-0.0.33 lib/bot/rspec/syntax.rb
bot-0.0.32 lib/bot/rspec/syntax.rb
bot-0.0.31 lib/bot/rspec/syntax.rb
bot-0.0.30 lib/bot/rspec/syntax.rb
bot-0.0.29 lib/bot/rspec/syntax.rb
bot-0.0.28 lib/bot/rspec/syntax.rb
bot-0.0.27 lib/bot/rspec/syntax.rb
bot-0.0.26 lib/bot/rspec/syntax.rb