spec/notification_spec.rb in rapnd-0.1.9 vs spec/notification_spec.rb in rapnd-0.1.10

- old
+ new

@@ -7,9 +7,15 @@ it 'removes whitespace from the device token' do @notification.device_token.should == '12345' end + it 'does not set the body key if only an alert is passed' do + @notification = Rapnd::Notification.new(:alert => 'Big test time', :custom => {:key => 'This is a test!', :spid => 1234}, :device_token => '1234 5') + + @notification.payload.should == {:aps => "Big test time", :key => "This is a test!", :spid => 1234} + end + it "automatically assigns hash variables to instance variables" do @notification.badge.should == 99 @notification.custom.should == {:key => 'This is a test!', :spid => 1234} end