test/application_test.rb in resque-aps-0.9.1 vs test/application_test.rb in resque-aps-0.9.2
- old
+ new
@@ -5,11 +5,12 @@
n = ResqueAps::Application.new('name' => 'SomeApp', 'cert_file' => '/var/apps/certificates/some_app.pem', 'cert_passwd' => 'hello')
assert_equal '#<ResqueAps::Application "SomeApp", "hello", "/var/apps/certificates/some_app.pem">', n.inspect
end
test "can create and close sockets" do
- socket, ssl = ResqueAps::Application.create_sockets(File.dirname(__FILE__) + "/../test-dev.pem", nil, Resque.aps_gateway_host, Resque.aps_gateway_port)
+ cert = File.read(File.dirname(__FILE__) + "/../test-dev.pem")
+ socket, ssl = ResqueAps::Application.create_sockets(cert, nil, Resque.aps_gateway_host, Resque.aps_gateway_port)
ResqueAps::Application.close_sockets(socket, ssl)
end
test "can run socket block" do
a = ResqueAps::Application.new(:name => "TestApp", :cert_file => File.dirname(__FILE__) + "/../test-dev.pem")
@@ -32,10 +33,10 @@
def after_aps_write(notification)
logger.debug "after_aps_write #{notification.inspect}"
end
- def failed_aps_write(notification)
+ def failed_aps_write(notification, exception)
logger.debug "failed_aps_write #{notification.inspect}"
end
def notify_aps_admin(exception)
logger.debug "notify_aps_admin #{exception}"
\ No newline at end of file