Sha256: 94f34536c38377881bcb84e7f8e7491c6bf82e14dac5872ea4dec3d0c99e1428

Contents?: true

Size: 710 Bytes

Versions: 11

Compression:

Stored size: 710 Bytes

Contents

require 'helper'

Parse.init

class TestCloud < Test::Unit::TestCase
	# functions stored in test/cloud_functions/MyCloudCode
	# see https://parse.com/docs/cloud_code_guide to learn how to use Parse Cloud Code
	#
	# Parse.Cloud.define('trivial', function(request, response) {
  # 	response.success(request.params);
	# });

	def setup
    Parse.init
	end

	def test_cloud_function_initialize
		assert_not_equal nil, Parse::Cloud::Function.new("trivial")
	end

	def test_cloud_function
		VCR.use_cassette('test_cloud_function', :record => :new_episodes) do
			function = Parse::Cloud::Function.new("trivial")
			params = {"foo" => "bar"}
			resp = function.call(params)
			assert_equal resp, params
		end
	end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
parse-ruby-client-0.1.14 test/test_cloud.rb
parse-ruby-client-0.1.13 test/test_cloud.rb
parse-ruby-client-0.1.12 test/test_cloud.rb
parse-ruby-client-0.1.11 test/test_cloud.rb
parse-ruby-client-0.1.10 test/test_cloud.rb
parse-ruby-client-0.1.9 test/test_cloud.rb
parse-ruby-client-0.1.8 test/test_cloud.rb
parse-ruby-client-0.1.7 test/test_cloud.rb
parse-ruby-client-0.1.6 test/test_cloud.rb
parse-ruby-client-0.1.5 test/test_cloud.rb
parse-ruby-client-0.1.4 test/test_cloud.rb