Sha256: 7bf1dae72d7188afb4b5a99ad66f2b85bb552f2eab7bfec61c1a269c436fb3fe

Contents?: true

Size: 599 Bytes

Versions: 12

Compression:

Stored size: 599 Bytes

Contents

require 'unit_spec_helper'

shared_examples 'Rpush::Client::Wpns::Notification' do
  let(:app) { Rpush::Wpns::App.create!(name: 'test', auth_key: 'abc') }
  let(:notification) { described_class.new }

  it "should have an url in the uri parameter" do
    notification = described_class.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 = described_class.new(data: {})
    notification.valid?
    expect(notification.errors[:data]).to include("can't be blank")
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

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