has_moderated 0.0.26 → 0.0.27

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,4 +33,22 @@ describe HjoinTest do
33
33
  Task.first.hjoin_tests.count.should eq(1)
34
34
  Task.first.hjoin_tests.first.title.should eq("HJoin")
35
35
  end
36
+
37
+ it "moderates assoc to existing" do
38
+ t = Task.new :title => "Test"
39
+ t.save
40
+ Moderation.last.accept
41
+
42
+ hjt = HjoinTest.create! :title => "Existing"
43
+ HjoinTest.count.should eq(1)
44
+
45
+ t = Task.first
46
+ t.hjoin_tests << hjt
47
+ Task.first.hjoin_tests.count.should eq(0)
48
+
49
+ Moderation.last.accept
50
+
51
+ Task.first.hjoin_tests.count.should eq(1)
52
+ Task.first.hjoin_tests.first.title.should eq("Existing")
53
+ end
36
54
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_moderated
3
3
  version: !ruby/object:Gem::Version
4
- hash: 43
4
+ hash: 41
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 26
10
- version: 0.0.26
9
+ - 27
10
+ version: 0.0.27
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jan Berdajs
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-18 00:00:00 +02:00
18
+ date: 2011-10-21 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency