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

Version Path
rhosync-2.0.2 spec/jobs/ping_job_spec.rb
rhosync-2.0.1 spec/jobs/ping_job_spec.rb
rhosync-2.0.0 spec/jobs/ping_job_spec.rb
rhosync-2.0.0.rc2 spec/jobs/ping_job_spec.rb
rhosync-2.0.0.rc1 spec/jobs/ping_job_spec.rb
rhosync-2.0.0.beta13 spec/jobs/ping_job_spec.rb
rhosync-2.0.0.beta12 spec/jobs/ping_job_spec.rb
rhosync-2.0.0.beta11 spec/jobs/ping_job_spec.rb
rhosync-2.0.0.beta10 spec/jobs/ping_job_spec.rb
rhosync-2.0.0.beta9 spec/jobs/ping_job_spec.rb
rhosync-2.0.0.beta8 spec/jobs/ping_job_spec.rb
rhosync-2.0.0.beta7 spec/jobs/ping_job_spec.rb
rhosync-2.0.0.beta6 spec/jobs/ping_job_spec.rb
rhosync-2.0.0.beta4 spec/jobs/ping_job_spec.rb
rhosync-2.0.0.beta3 spec/jobs/ping_job_spec.rb
rhosync-2.0.0.beta2 spec/jobs/ping_job_spec.rb
rhosync-2.0.0.beta1 spec/jobs/ping_job_spec.rb