Sha256: 4d65e22e56a7f62cf64ac54517869685d3422a307fb0a89a1cd41a0714993ac2
Contents?: true
Size: 861 Bytes
Versions: 2
Compression:
Stored size: 861 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? expect(notification.errors[:uri]).to include('is invalid') end it "should be invalid if there's no data" do notification = Rpush::Client::ActiveRecord::Wpns::Notification.new(data: {}) notification.valid? expect(notification.errors[:data]).to include("can't be blank") end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rpush-2.3.2-java | spec/unit/client/active_record/wpns/notification_spec.rb |
rpush-2.3.2 | spec/unit/client/active_record/wpns/notification_spec.rb |