Sha256: 82a360259d0b2eef56c66a2dd36f61397d077502539cdb5df57ceec07391d5d0

Contents?: true

Size: 363 Bytes

Versions: 10

Compression:

Stored size: 363 Bytes

Contents

require 'rails_helper'

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

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
wupee-2.0.0.beta2 spec/models/concerns/attached_object_spec.rb
wupee-2.0.0.beta1 spec/models/concerns/attached_object_spec.rb
wupee-1.1.4 spec/models/concerns/attached_object_spec.rb
wupee-1.1.3 spec/models/concerns/attached_object_spec.rb
wupee-1.1.2 spec/models/concerns/attached_object_spec.rb
wupee-1.0.4 spec/models/concerns/attached_object_spec.rb
wupee-1.0.3 spec/models/concerns/attached_object_spec.rb
wupee-1.0.2 spec/models/concerns/attached_object_spec.rb
wupee-1.0.1 spec/models/concerns/attached_object_spec.rb
wupee-1.0.0 spec/models/concerns/attached_object_spec.rb