spec/jobs/ping_job_spec.rb in rhosync-2.1.17 vs spec/jobs/ping_job_spec.rb in rhosync-2.1.18.beta1

- old
+ new

@@ -108,7 +108,13 @@ exception_raised = true end exception_raised.should == true end - + it "should skip ping for unknown user or user with no clients" do + params = {"user_id" => [ 'fake_user' ], "api_token" => @api_token, + "sources" => [@s.name], "message" => 'hello world', + "vibrate" => '5', "badge" => '5', "sound" => 'hello.mp3', 'phone_id' => nil } + PingJob.should_receive(:log).once.with(/Skipping ping for unknown user 'fake_user' or 'fake_user' has no registered clients.../) + PingJob.perform(params) + end end \ No newline at end of file