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