Sha256: 4e5f6c94708cc5f7af29bf1cafe8d3835af53fcb224aa12ca1012afc71708ed0
Contents?: true
Size: 876 Bytes
Versions: 12
Compression:
Stored size: 876 Bytes
Contents
require 'unit_spec_helper' require 'unit/notification_shared.rb' describe Rpush::Client::ActiveRecord::Wpns::Notification do it_should_behave_like 'an Notification subclass' let(:app) { Rpush::Client::ActiveRecord::Wpns::App.create!(name: 'test', auth_key: 'abc') } let(:notification_class) { Rpush::Client::ActiveRecord::Wpns::Notification } let(:notification) { notification_class.new } it "should have an url in the uri parameter" do notification = Rpush::Client::ActiveRecord::Wpns::Notification.new(uri: "somthing") notification.valid? notification.errors[:uri].include?("is invalid").should be_true end it "should be invalid if there's no message" do notification = Rpush::Client::ActiveRecord::Wpns::Notification.new(alert: "") notification.valid? notification.errors[:alert].include?("can't be blank").should be_true end end
Version data entries
12 entries across 12 versions & 1 rubygems