Sha256: cf4ad88d23aef7b90264cd5aa1ae43aff1058e307ac14c6ec35835ad67765d7b

Contents?: true

Size: 536 Bytes

Versions: 8

Compression:

Stored size: 536 Bytes

Contents

require 'spec_helper'
require 'grocer/newsstand_notification'
require 'grocer/shared_examples_for_notifications'

describe Grocer::NewsstandNotification do
  describe 'binary format' do
    let(:payload_options) { Hash.new }
    let(:payload) { payload_hash(notification) }

    include_examples 'a notification'

    it 'requires a payload' do
      expect(payload[:aps]).to_not be_empty
    end

    it 'encodes content-available as part of the payload' do
      expect(payload[:aps][:'content-available']).to eq(1)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
grocer-0.7.1 spec/grocer/newsstand_notification_spec.rb
grocer-0.7.0 spec/grocer/newsstand_notification_spec.rb
grocer-0.6.1 spec/grocer/newsstand_notification_spec.rb
grocer-0.6.0 spec/grocer/newsstand_notification_spec.rb
grocer-0.5.0 spec/grocer/newsstand_notification_spec.rb
grocer-0.4.1 spec/grocer/newsstand_notification_spec.rb
grocer-0.4.0 spec/grocer/newsstand_notification_spec.rb
grocer-0.3.4 spec/grocer/newsstand_notification_spec.rb