Sha256: 294ece6a1cbeb5daad94f2a86eef88bf2665582dc4377333f6844ceee71d3a8a

Contents?: true

Size: 694 Bytes

Versions: 12

Compression:

Stored size: 694 Bytes

Contents

require 'unit_spec_helper'

describe Rpush::Client::ActiveRecord::Notification do
  it_behaves_like 'Rpush::Client::Notification'

  subject(:notification) { described_class.new }

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

  it 'does not mix notification and data payloads' do
    notification.data = { key: 'this is data' }
    notification.notification = { key: 'this is notification' }
    expect(notification.data).to eq('key' => 'this is data')
    expect(notification.notification).to eq('key' => 'this is notification')
  end
end if active_record?

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rpush-9.2.0 spec/unit/client/active_record/notification_spec.rb
rpush-9.1.0 spec/unit/client/active_record/notification_spec.rb
rpush-9.0.0 spec/unit/client/active_record/notification_spec.rb
rpush-8.0.0 spec/unit/client/active_record/notification_spec.rb
rpush-7.0.1 spec/unit/client/active_record/notification_spec.rb
rpush-7.0.0 spec/unit/client/active_record/notification_spec.rb
rpush-6.0.1 spec/unit/client/active_record/notification_spec.rb
rpush-6.0.0 spec/unit/client/active_record/notification_spec.rb
rpush-5.4.0 spec/unit/client/active_record/notification_spec.rb
rpush-5.3.0 spec/unit/client/active_record/notification_spec.rb
rpush-5.2.0 spec/unit/client/active_record/notification_spec.rb
rpush-5.1.0 spec/unit/client/active_record/notification_spec.rb