Sha256: 13f33bf25bcc4e61cea2bc1a30a3873d0459cb6f87135f880ab771634ddadc66

Contents?: true

Size: 413 Bytes

Versions: 2

Compression:

Stored size: 413 Bytes

Contents

require 'rails_helper'

shared_examples_for "Wupee::Receiver" do
  let(:model) { described_class }

  it "has many notifications" do
    expect(model.new).to respond_to(:notifications)
  end

  it "destroys notification on destroy" do
    receiver = create model.name.underscore
    create :notification, receiver: receiver
    expect { receiver.destroy }.to change { Wupee::Notification.count }.by(-1)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wupee-2.0.0.beta2 spec/models/concerns/receiver_spec.rb
wupee-2.0.0.beta1 spec/models/concerns/receiver_spec.rb