Sha256: 6c413a518f8225a7fa099a218ef183f81067e0f1ca82a097d6ebb8311c043f8c
Contents?: true
Size: 969 Bytes
Versions: 7
Compression:
Stored size: 969 Bytes
Contents
require File.join(File.dirname(__FILE__),'..','api_helper') describe "RhoconnectApiPing" do it_should_behave_like "ApiHelper" do it "should do ping synchronously" do params = {"user_id" => @u.id, "sources" => [@s.name], "message" => 'hello world', "vibrate" => '5', "badge" => '5', "sound" => 'hello.mp3'} PingJob.should_receive(:perform).once.with(params) post "/rc/#{Rhoconnect::API_VERSION}/users/ping", params, {Rhoconnect::API_TOKEN_HEADER => @api_token} last_response.should be_ok end it "should do ping asynchronously" do params = {"user_id" => @u.id, "async" => "true","sources" => [@s.name], "message" => 'hello world', "vibrate" => '5', "badge" => '5', "sound" => 'hello.mp3'} PingJob.should_receive(:enqueue).once.with(params) post "/rc/#{Rhoconnect::API_VERSION}/users/ping", params, {Rhoconnect::API_TOKEN_HEADER => @api_token} last_response.should be_ok end end end
Version data entries
7 entries across 7 versions & 1 rubygems