Skip to content

Instantly share code, notes, and snippets.

@pzol
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pzol/41edbf987008eb2c2bc1 to your computer and use it in GitHub Desktop.
Save pzol/41edbf987008eb2c2bc1 to your computer and use it in GitHub Desktop.
cmd.rb
require 'test_helper'
require 'masterize'
require 'master_hotels/cmd/rate_append'
class RateAppendTest < Minitest::Test
include MasterHotels
def test_append
ra = Cmd::RateAppend.new
cmd = ra.append("WRO0001", {})
exp = [:update, { :code => "MHC0001" }, { "$push" => { "rates" => {} } }]
assert_equal(exp, cmd.cmd)
# cmd.extend(MongoCmd)
# cmd.call(collecton)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment