Sha256: c2d6d08dd8efae8d5509c26919f2cd8171769329bf6b3c1b69233f8e4e861920

Contents?: true

Size: 669 Bytes

Versions: 15

Compression:

Stored size: 669 Bytes

Contents

require 'unit_spec_helper'

describe Rpush::Client::ActiveRecord::Notification do
  let(:notification) { Rpush::Client::ActiveRecord::Notification.new }

  it 'allows assignment of many registration IDs' do
    notification.registration_ids = %w(a b)
    notification.registration_ids.should eq %w(a b)
  end

  it 'allows assignment of a single registration ID' do
    notification.registration_ids = 'a'
    notification.registration_ids.should eq ['a']
  end

  it 'saves its parent App if required' do
    notification.app = Rpush::Client::ActiveRecord::App.new(name: "aname")
    expect(notification.app).to be_valid
    expect(notification).to be_valid
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rpush-2.3.1-java spec/unit/client/active_record/notification_spec.rb
rpush-2.3.1 spec/unit/client/active_record/notification_spec.rb
rpush-2.3.0-java spec/unit/client/active_record/notification_spec.rb
rpush-2.3.0 spec/unit/client/active_record/notification_spec.rb
rpush-2.3.0.rc1 spec/unit/client/active_record/notification_spec.rb
rpush-2.2.0-java spec/unit/client/active_record/notification_spec.rb
rpush-2.2.0 spec/unit/client/active_record/notification_spec.rb
rpush-2.1.0-java spec/unit/client/active_record/notification_spec.rb
rpush-2.1.0 spec/unit/client/active_record/notification_spec.rb
rpush-2.0.1-java spec/unit/client/active_record/notification_spec.rb
rpush-2.0.1 spec/unit/client/active_record/notification_spec.rb
rpush-2.0.0-java spec/unit/client/active_record/notification_spec.rb
rpush-2.0.0 spec/unit/client/active_record/notification_spec.rb
rpush-2.0.0.rc1-java spec/unit/client/active_record/notification_spec.rb
rpush-2.0.0.rc1 spec/unit/client/active_record/notification_spec.rb