You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was just trying to test for feedback in light of issues such as #14. This issue labelled as enhancement seems to suggest that this should be possible. Here’s the rspec test snippet I came up with for this. I threw in the second expectation after I found #80 just to be sure.
require'spec_helper'describe'grocer push notifications'dobefore(:each)do@server=Grocer.server(port: 2195)@server.accept# starts listening in backgroundendafter(:each)do@server.closeendlet(:notification)doGrocer::Notification.new(device_token: "wrongtoken",alert: "I should trigger feedback.",badge: 42)endlet(:cert){"#{Rails.root}/app/assets/push_notifications/apple_push_notification_dev.pem"}let!(:push_client){Grocer.pusher(certificate: cert)}let!(:feedback_client){Grocer.feedback(certificate: cert,retries: 3)}it'should have feedback for an invalid notification'dopush_client.push(notification)expect(feedback_client.count).not_toeq(0)endit'should have feedback for an invalid notification with to_a fix'dopush_client.push(notification)expect(feedback_client.to_a.count).not_toeq(0)endend
No description provided.
The text was updated successfully, but these errors were encountered: