Sha256: 87e661ece3ea52d7cc8050800ec45af63e77cba4a8ad1ad3687f85e48aad6ad2
Contents?: true
Size: 1.14 KB
Versions: 2
Compression:
Stored size: 1.14 KB
Contents
require 'unit_spec_helper' describe Rpush::App do it 'does not validate an app with an invalid certificate' do app = Rpush::Apns::App.new(:name => 'test', :environment => 'development', :certificate => 'foo') app.valid? app.errors[:certificate].should eq ['Certificate value must contain a certificate and a private key.'] end it 'validates a certificate without a password' do app = Rpush::Apns::App.new :name => 'test', :environment => 'development', :certificate => TEST_CERT app.valid? app.errors[:certificate].should eq [] end it 'validates a certificate with a password' do app = Rpush::Apns::App.new :name => 'test', :environment => 'development', :certificate => TEST_CERT_WITH_PASSWORD, :password => 'fubar' app.valid? app.errors[:certificate].should eq [] end it 'validates a certificate with an incorrect password' do app = Rpush::Apns::App.new :name => 'test', :environment => 'development', :certificate => TEST_CERT_WITH_PASSWORD, :password => 'incorrect' app.valid? app.errors[:certificate].should eq ["Certificate value must contain a certificate and a private key."] end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rpush-1.0.0-java | spec/unit/apns/app_spec.rb |
rpush-1.0.0 | spec/unit/apns/app_spec.rb |