Sha256: a67d001fe90e21903936d54e6e7a1a1e1d75b309c3749644f3bcc953adda4895
Contents?: true
Size: 1000 Bytes
Versions: 17
Compression:
Stored size: 1000 Bytes
Contents
require File.join(File.dirname(__FILE__),'..','spec_helper') describe "PingJob" do it_should_behave_like "SpecBootstrapHelper" it_should_behave_like "SourceAdapterHelper" it "should perform iphone ping" do params = {"user_id" => @u.id, "api_token" => @api_token, "sources" => [@s.name], "message" => 'hello world', "vibrate" => '5', "badge" => '5', "sound" => 'hello.mp3'} Iphone.should_receive(:ping).once.with({'device_pin' => @c.device_pin, 'device_port' => @c.device_port}.merge!(params)) PingJob.perform(params) end it "should perform blackberry ping" do params = {"user_id" => @u.id, "api_token" => @api_token, "sources" => [@s.name], "message" => 'hello world', "vibrate" => '5', "badge" => '5', "sound" => 'hello.mp3'} @c.device_type = 'blackberry' Blackberry.should_receive(:ping).once.with({'device_pin' => @c.device_pin, 'device_port' => @c.device_port}.merge!(params)) PingJob.perform(params) end end
Version data entries
17 entries across 17 versions & 1 rubygems