notifiable-rails 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d94e321ae2b6cdd5cb650f00076bf9c704849ff6
4
- data.tar.gz: ae6831bcea81f4ea893373c083282eb2fe8ee9b4
3
+ metadata.gz: 0b9758bcbfa68e1152383edd4993b474339b9c32
4
+ data.tar.gz: 3fce69e3fb495368fe940af16d66868eccfbe5b3
5
5
  SHA512:
6
- metadata.gz: 15eebde71c555f7e678cb94bed12b0de6f10b818da1e3e25416102ba578205338471d137e850406bc388c0e3c39ed7486201909ddc8a19c7be09e3639c8afe28
7
- data.tar.gz: 1e71e6c32c77b2a04ed63dff6d9e12ce570fbff0ffd7d17fb77e62271d5781f244547f04cc77fe87c300ae50dd6857359c8986b962e682551e76c56f11c41c4a
6
+ metadata.gz: 5f9677fca0b6053c6519a11092cb55cdd9a5b51f5964542a4909fb62d2404c3b458479723e20816809c30360844c19d7af665a45cac70f29407e8f21aefa9d95
7
+ data.tar.gz: 68b4ad53c80151e34483083756c273da2b9a01d46ab52d600e284ff89aedeb6f4899a260a92fada36a3079b74a6a10cc308d8cbe70aa2a5aede377b3f7689b24
@@ -3,6 +3,6 @@ module Notifiable
3
3
 
4
4
  serialize :params
5
5
 
6
- has_many :notification_statuses, :class_name => 'Notifiable::NotificationStatus'
6
+ has_many :notification_statuses, :class_name => 'Notifiable::NotificationStatus', :dependent => :destroy
7
7
  end
8
8
  end
@@ -1,3 +1,3 @@
1
1
  module Notifiable
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
3
3
  end
@@ -14,4 +14,13 @@ describe Notifiable::Notification do
14
14
  Notifiable::Notification.first.params.should == {:custom_property => "A different message"}
15
15
  end
16
16
 
17
+ it "destroys dependent NotificationStatuses" do
18
+ n = Notifiable::Notification.create :params => {:custom_property => "A different message"}
19
+ Notifiable::NotificationStatus.create :notification => n
20
+
21
+ n.destroy
22
+
23
+ Notifiable::NotificationStatus.count.should == 0
24
+ end
25
+
17
26
  end