public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
add comment expiry fields to site and article

git-svn-id: http://svn.techno-weenie.net/projects/mephisto/trunk@1283 
567b1171-46fb-0310-a4c9-b4bef9110e78
technoweenie (author)
Thu Jun 29 07:14:04 -0700 2006
commit  f9777f357377ca061857b5c0ec3c9499a77689e8
tree    da6ab15d0c4506f6b3c9b5a1e89dfe035ccda163
parent  ee5c5320fa067614f7f51191541e25ea5fccc253
...
4
5
6
7
8
 
 
9
10
11
...
4
5
6
 
 
7
8
9
10
11
0
@@ -4,8 +4,8 @@ class ArticleSweeper < ActionController::Caching::Sweeper
0
   def before_save(record)
0
     @event = Event.new
0
     @event.mode = case
0
- when record.is_a?(Comment) then 'comment'
0
- when record.new_record? then 'publish'
0
+ when record.is_a?(Comment) then 'comment'
0
+ when record.new_record? then 'publish'
0
       else 'edit'
0
     end
0
   end
...
1
2
 
3
 
4
5
6
...
11
12
13
14
 
 
 
 
 
15
16
17
...
110
111
112
 
 
 
 
113
 
 
 
 
 
 
 
 
114
115
116
...
1
 
2
3
4
5
6
7
...
12
13
14
 
15
16
17
18
19
20
21
22
...
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
0
@@ -1,6 +1,7 @@
0
 class Article < Content
0
- validates_presence_of :title, :user_id
0
+ validates_presence_of :title, :user_id, :site_id
0
 
0
+ after_validation :set_comment_expiration
0
   before_create :create_permalink
0
   before_create :set_filter_from_user
0
   after_save :save_assigned_sections
0
@@ -11,7 +12,11 @@ class Article < Content
0
     end
0
   end
0
 
0
- acts_as_draftable :fields => [:title, :body, :excerpt]
0
+ acts_as_draftable :fields => [:title, :body, :excerpt, :site_id] do
0
+ def self.included(base)
0
+ base.validates_presence_of :site_id
0
+ end
0
+ end
0
 
0
   has_many :assigned_sections
0
   has_many :sections, :through => :assigned_sections, :order => 'sections.name'
0
@@ -110,7 +115,19 @@ class Article < Content
0
       :permalink => permalink }.merge(options)
0
   end
0
 
0
+ def comments_expired?
0
+ expire_comments_at && expire_comments_at > Time.now.utc
0
+ end
0
+
0
   protected
0
+ def set_comment_expiration
0
+ if site.accept_comments?
0
+ self.expire_comments_at = published_at + site.comment_age.days if site.comment_age.to_i > 0
0
+ else
0
+ self.expire_comments_at = published_at
0
+ end unless !errors.empty? || published_at.nil? || expire_comments_at
0
+ end
0
+
0
     def create_permalink
0
       self.permalink = title.strip.downcase \
0
         .gsub(/['"]/, '') \
...
33
34
35
36
 
37
38
39
...
33
34
35
 
36
37
38
39
0
@@ -33,7 +33,7 @@ class Section < ActiveRecord::Base
0
     # returns [<#Section: about>, 'site_map']
0
     def find_section_and_page_name(section_path)
0
       page_name = []
0
- section = nil
0
+ section = nil
0
       while section.nil? && section_path.any?
0
         section = find_by_name(section_path.join('/'))
0
         page_name << section_path.pop if section.nil?
...
11
12
13
 
14
15
16
...
24
25
26
 
 
 
 
 
 
 
 
27
...
11
12
13
14
15
16
17
...
25
26
27
28
29
30
31
32
33
34
35
36
0
@@ -11,6 +11,7 @@ class Site < ActiveRecord::Base
0
   
0
   serialize :filters, Array
0
   
0
+ before_validation_on_create :set_default_comment_options
0
   validates_uniqueness_of :host
0
 
0
   def filters=(value)
0
@@ -24,4 +25,12 @@ class Site < ActiveRecord::Base
0
       'host' => host
0
     }
0
   end
0
+
0
+ protected
0
+ def set_default_comment_options
0
+ self.accept_comments = true unless accept_comments == false
0
+ self.approve_comments = false unless approve_comments?
0
+ self.comment_age = 30 unless comment_age
0
+ true
0
+ end
0
 end
...
38
39
40
41
 
42
43
...
38
39
40
 
41
42
43
0
@@ -38,6 +38,6 @@ ActionController::Routing::Routes.draw do |map|
0
   
0
     m.paged_search 'search/:q/page/:page', :action => 'search'
0
     m.search 'search/:q', :action => 'search', :q => nil
0
- m.section '*sections', :action => 'list'
0
+ m.section '*sections', :action => 'list'
0
   end
0
 end
...
1
2
3
4
5
 
 
 
 
6
...
1
2
3
 
4
5
6
7
8
9
0
@@ -1,4 +1,7 @@
0
 default:
0
   id: 1
0
   host: unusedfornow
0
- title: Mephisto
0
\ No newline at end of file
0
+ title: Mephisto
0
+ accept_comments: true
0
+ approve_comments: false
0
+ comment_age: 30
0
\ No newline at end of file
...
2
3
4
5
 
6
7
8
...
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
93
94
...
97
98
99
100
101
102
103
104
 
105
106
107
...
132
133
134
135
136
137
138
 
 
 
139
140
141
...
2
3
4
 
5
6
7
8
...
41
42
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
...
99
100
101
 
102
103
104
105
106
107
108
109
...
134
135
136
 
 
137
138
139
140
141
142
143
144
0
@@ -2,7 +2,7 @@
0
 # migrations feature of ActiveRecord to incrementally modify your database, and
0
 # then regenerate this schema definition.
0
 
0
-ActiveRecord::Schema.define(:version => 28) do
0
+ActiveRecord::Schema.define(:version => 29) do
0
 
0
   create_table "assigned_sections", :force => true do |t|
0
     t.column "article_id", :integer
0
@@ -41,54 +41,56 @@ ActiveRecord::Schema.define(:version => 28) do
0
   end
0
 
0
   create_table "content_versions", :force => true do |t|
0
- t.column "content_id", :integer
0
- t.column "version", :integer
0
- t.column "article_id", :integer
0
- t.column "user_id", :integer
0
- t.column "title", :string
0
- t.column "permalink", :string
0
- t.column "excerpt", :text
0
- t.column "body", :text
0
- t.column "excerpt_html", :text
0
- t.column "body_html", :text
0
- t.column "created_at", :datetime
0
- t.column "updated_at", :datetime
0
- t.column "published_at", :datetime
0
- t.column "author", :string, :limit => 100
0
- t.column "author_url", :string
0
- t.column "author_email", :string
0
- t.column "author_ip", :string, :limit => 100
0
- t.column "comments_count", :integer, :default => 0
0
- t.column "filters", :text
0
- t.column "updater_id", :integer
0
- t.column "versioned_type", :string, :limit => 20
0
- t.column "site_id", :integer
0
- t.column "approved", :boolean, :default => false
0
+ t.column "content_id", :integer
0
+ t.column "version", :integer
0
+ t.column "article_id", :integer
0
+ t.column "user_id", :integer
0
+ t.column "title", :string
0
+ t.column "permalink", :string
0
+ t.column "excerpt", :text
0
+ t.column "body", :text
0
+ t.column "excerpt_html", :text
0
+ t.column "body_html", :text
0
+ t.column "created_at", :datetime
0
+ t.column "updated_at", :datetime
0
+ t.column "published_at", :datetime
0
+ t.column "author", :string, :limit => 100
0
+ t.column "author_url", :string
0
+ t.column "author_email", :string
0
+ t.column "author_ip", :string, :limit => 100
0
+ t.column "comments_count", :integer, :default => 0
0
+ t.column "filters", :text
0
+ t.column "updater_id", :integer
0
+ t.column "versioned_type", :string, :limit => 20
0
+ t.column "site_id", :integer
0
+ t.column "approved", :boolean, :default => false
0
+ t.column "expire_comments_at", :datetime
0
   end
0
 
0
   create_table "contents", :force => true do |t|
0
- t.column "article_id", :integer
0
- t.column "user_id", :integer
0
- t.column "title", :string
0
- t.column "permalink", :string
0
- t.column "excerpt", :text
0
- t.column "body", :text
0
- t.column "excerpt_html", :text
0
- t.column "body_html", :text
0
- t.column "created_at", :datetime
0
- t.column "updated_at", :datetime
0
- t.column "published_at", :datetime
0
- t.column "type", :string, :limit => 20
0
- t.column "author", :string, :limit => 100
0
- t.column "author_url", :string
0
- t.column "author_email", :string
0
- t.column "author_ip", :string, :limit => 100
0
- t.column "comments_count", :integer, :default => 0
0
- t.column "filters", :text
0
- t.column "updater_id", :integer
0
- t.column "version", :integer
0
- t.column "site_id", :integer
0
- t.column "approved", :boolean, :default => false
0
+ t.column "article_id", :integer
0
+ t.column "user_id", :integer
0
+ t.column "title", :string
0
+ t.column "permalink", :string
0
+ t.column "excerpt", :text
0
+ t.column "body", :text
0
+ t.column "excerpt_html", :text
0
+ t.column "body_html", :text
0
+ t.column "created_at", :datetime
0
+ t.column "updated_at", :datetime
0
+ t.column "published_at", :datetime
0
+ t.column "type", :string, :limit => 20
0
+ t.column "author", :string, :limit => 100
0
+ t.column "author_url", :string
0
+ t.column "author_email", :string
0
+ t.column "author_ip", :string, :limit => 100
0
+ t.column "comments_count", :integer, :default => 0
0
+ t.column "filters", :text
0
+ t.column "version", :integer
0
+ t.column "updater_id", :integer
0
+ t.column "site_id", :integer
0
+ t.column "approved", :boolean, :default => false
0
+ t.column "expire_comments_at", :datetime
0
   end
0
 
0
   create_table "db_files", :force => true do |t|
0
@@ -97,11 +99,11 @@ ActiveRecord::Schema.define(:version => 28) do
0
 
0
   create_table "events", :force => true do |t|
0
     t.column "mode", :string
0
- t.column "user_id", :integer
0
     t.column "article_id", :integer
0
     t.column "title", :text
0
     t.column "body", :text
0
     t.column "created_at", :datetime
0
+ t.column "user_id", :integer
0
     t.column "author", :string, :limit => 100
0
     t.column "comment_id", :integer
0
     t.column "site_id", :integer
0
@@ -132,10 +134,11 @@ ActiveRecord::Schema.define(:version => 28) do
0
     t.column "filters", :text
0
     t.column "articles_per_page", :integer, :default => 15
0
     t.column "host", :string
0
- t.column "comment_lifetime", :integer
0
- t.column "comment_link_max", :integer
0
     t.column "akismet_key", :string, :limit => 100
0
     t.column "akismet_url", :string
0
+ t.column "accept_comments", :boolean
0
+ t.column "approve_comments", :boolean
0
+ t.column "comment_age", :integer
0
   end
0
 
0
   create_table "users", :force => true do |t|
...
9
10
11
 
 
 
12
13
14
...
9
10
11
12
13
14
15
16
17
0
@@ -9,6 +9,9 @@ first:
0
   title: Mephisto
0
   host: test.host
0
   filters: "--- \n- :foo\n- :bar\n"
0
+ accept_comments: true
0
+ approve_comments: false
0
+ comment_age: 30
0
 
0
 hostess:
0
   id: 2
...
1
2
3
4
 
5
6
7
 
8
9
10
...
24
25
26
27
28
 
 
29
30
31
32
 
33
34
35
36
37
38
 
39
40
41
42
43
 
44
45
46
47
48
49
 
50
51
52
...
56
57
58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
...
1
2
3
 
4
5
6
 
7
8
9
10
...
24
25
26
 
 
27
28
29
30
31
 
32
33
34
35
36
37
 
38
39
40
41
42
 
43
44
45
46
47
48
 
49
50
51
52
...
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
0
@@ -1,10 +1,10 @@
0
 require File.dirname(__FILE__) + '/../test_helper'
0
 
0
 class ArticleTest < Test::Unit::TestCase
0
- fixtures :contents, :users
0
+ fixtures :contents, :users, :sections, :sites
0
 
0
   def test_should_create_permalink
0
- a = Article.create :title => 'This IS a Tripped out title!!!1 (well not really)', :body => 'foo', :user_id => 1
0
+ a = Article.create :title => 'This IS a Tripped out title!!!1 (well not really)', :body => 'foo', :user_id => 1, :site_id => 1
0
     assert_equal 'this-is-a-tripped-out-title-1-well-not-really', a.permalink
0
   end
0
 
0
@@ -24,29 +24,29 @@ class ArticleTest < Test::Unit::TestCase
0
   end
0
 
0
   def test_should_show_status
0
- assert_equal :published, contents(:welcome).status
0
- assert_equal :pending, contents(:future).status
0
+ assert_equal :published, contents(:welcome).status
0
+ assert_equal :pending, contents(:future).status
0
   end
0
 
0
   def test_should_cache_redcloth
0
- a = Article.create :title => 'This IS a Tripped out title!!!1 (well not really)', :user => users(:quentin), :excerpt => '*foo*', :body => '_bar_'
0
+ a = Article.create :title => 'This IS a Tripped out title!!!1 (well not really)', :user => users(:quentin), :excerpt => '*foo*', :body => '_bar_', :site_id => 1
0
     assert_equal '<p><strong>foo</strong></p>', a.excerpt_html
0
     assert_equal '<p><em>bar</em></p>', a.body_html
0
   end
0
 
0
   def test_should_save_filters_from_user
0
- a = Article.create :title => 'This IS a Tripped out title!!!1 (well not really)', :user => users(:quentin), :excerpt => '*foo*', :body => '_bar_'
0
+ a = Article.create :title => 'This IS a Tripped out title!!!1 (well not really)', :user => users(:quentin), :excerpt => '*foo*', :body => '_bar_', :site_id => 1
0
     assert_equal :textile_filter, a.filters.first
0
   end
0
 
0
   def test_should_cache_bluecloth
0
- a = Article.create :title => 'simple Title', :user => users(:arthur), :body => "# bar\n\nfoo", :filters => [:markdown_filter]
0
+ a = Article.create :title => 'simple Title', :user => users(:arthur), :body => "# bar\n\nfoo", :filters => [:markdown_filter], :site_id => 1
0
     assert_equal "<h1>bar</h1>\n\n<p>foo</p>", a.body_html
0
   end
0
 
0
   def test_should_create_article_version
0
     assert_difference Article::Version, :count, 2 do
0
- Article.create :title => 'This IS a Tripped out title!!!1 (well not really)', :body => 'foo', :user_id => 1
0
+ Article.create :title => 'This IS a Tripped out title!!!1 (well not really)', :body => 'foo', :user_id => 1, :site_id => 1
0
       contents(:welcome).update_attributes :title => 'whoo!'
0
     end
0
   end
0
@@ -56,4 +56,38 @@ class ArticleTest < Test::Unit::TestCase
0
       contents(:welcome).update_attributes :body_html => 'nope'
0
     end
0
   end
0
+
0
+ def test_should_set_comment_expiration
0
+ article = Article.new(:title => 'bar', :body => 'blah', :user_id => 1, :published_at => Time.now.utc, :site_id => 1)
0
+ assert article.valid?, article.errors.full_messages.to_sentence
0
+ assert_equal (article.published_at + 30.days), article.expire_comments_at
0
+ end
0
+
0
+ def test_should_set_explicit_comment_expiration
0
+ date = 5.minutes.from_now
0
+ article = Article.new(:title => 'bar', :body => 'blah', :user_id => 1, :published_at => Time.now.utc, :site_id => 1, :expire_comments_at => date)
0
+ assert article.valid?, article.errors.full_messages.to_sentence
0
+ assert_equal date, article.expire_comments_at
0
+ end
0
+
0
+ def test_should_turn_off_comments
0
+ sites(:first).update_attributes(:accept_comments => false)
0
+ article = Article.new(:title => 'bar', :body => 'blah', :user_id => 1, :published_at => Time.now.utc, :site_id => 1)
0
+ assert article.valid?, article.errors.full_messages.to_sentence
0
+ assert_equal article.published_at, article.expire_comments_at
0
+ end
0
+
0
+ def test_should_set_no_comment_expiration
0
+ sites(:first).update_attributes(:comment_age => 0)
0
+ article = Article.new(:title => 'bar', :body => 'blah', :user_id => 1, :published_at => Time.now.utc, :site_id => 1)
0
+ assert article.valid?, article.errors.full_messages.to_sentence
0
+ assert_nil article.expire_comments_at
0
+ end
0
+
0
+ def test_comment_expiry
0
+ a = Article.new :expire_comments_at => 5.minutes.ago.utc
0
+ assert !a.comments_expired?
0
+ a.expire_comments_at = 5.minutes.from_now.utc
0
+ assert a.comments_expired?
0
+ end
0
 end
...
16
17
18
19
 
20
21
22
...
25
26
27
28
29
30
31
32
33
 
 
 
 
 
 
34
35
36
...
55
56
57
58
 
59
60
61
...
16
17
18
 
19
20
21
22
...
25
26
27
 
 
 
 
 
 
28
29
30
31
32
33
34
35
36
...
55
56
57
 
58
59
60
61
0
@@ -16,7 +16,7 @@ class DraftTest < Test::Unit::TestCase
0
 
0
   def test_should_count_new_drafts
0
     assert_difference Article::Draft, :count_new do
0
- Article.new(:title => 'foo').save_draft
0
+ Article.new(:title => 'foo', :site_id => 1).save_draft
0
     end
0
   end
0
 
0
@@ -25,12 +25,12 @@ class DraftTest < Test::Unit::TestCase
0
     assert_equal [content_drafts(:first)], sites(:first).drafts.find_new(:all)
0
     assert_equal [content_drafts(:cupcake_unfinished)], sites(:hostess).drafts.find_new(:all)
0
     
0
- Article.new(:title => 'foo').save_draft
0
- sites(:first).articles.create(:title => 'bar').save_draft
0
-
0
- # XXX (streadway) is this correct behavior? Should we be having many drafts through articles?
0
- assert_equal 1, sites(:first).drafts(true).count_new
0
- assert_equal 4, Article::Draft.count_new
0
+ assert_difference Article::Draft, :count_new, 2 do
0
+ assert_difference sites(:first).drafts, :count_new, 2 do
0
+ Article.new(:title => 'foo', :site_id => 1).save_draft
0
+ sites(:first).articles.create(:title => 'bar', :site_id => 1).save_draft
0
+ end
0
+ end
0
   end
0
 
0
   def test_should_change_draft_to_unsaved_article
0
@@ -55,7 +55,7 @@ class DraftTest < Test::Unit::TestCase
0
   def test_should_save_draft_of_new_article
0
     assert_no_difference Article, :count do
0
       assert_difference Article::Draft, :count do
0
- article = Article.new(:title => 'foo')
0
+ article = Article.new(:title => 'foo', :site_id => 1)
0
         article.save_draft
0
         assert_equal 'foo', article.draft.title
0
       end
...
1
2
3
4
 
5
6
7
...
52
53
54
55
56
 
 
57
58
59
60
61
 
62
63
64
...
1
2
3
 
4
5
6
7
...
52
53
54
 
 
55
56
57
58
59
60
 
61
62
63
64
0
@@ -1,7 +1,7 @@
0
 require File.dirname(__FILE__) + '/../test_helper'
0
 
0
 class SectionTest < Test::Unit::TestCase
0
- fixtures :sections, :contents, :assigned_sections, :sites
0
+ fixtures :sections, :contents, :assigned_sections, :sites, :users
0
 
0
   def test_find_or_create_sanity_check
0
     assert_no_difference Section, :count do
0
@@ -52,13 +52,13 @@ class SectionTest < Test::Unit::TestCase
0
   end
0
 
0
   def test_should_include_home_section_by_default
0
- assert contents(:welcome).has_section?(sections(:home))
0
- assert contents(:welcome).has_section?(sections(:about))
0
+ assert contents(:welcome).has_section?(sections(:home))
0
+ assert contents(:welcome).has_section?(sections(:about))
0
     assert !contents(:another).has_section?(sections(:about))
0
   end
0
 
0
   def test_should_create_article_with_sections
0
- a = Article.create :title => 'foo', :body => 'bar', :user_id => 1, :section_ids => [sections(:home).id, sections(:about).id]
0
+ a = Article.create :title => 'foo', :body => 'bar', :user_id => 1, :section_ids => [sections(:home).id, sections(:about).id], :site_id => 1
0
     assert_equal [sections(:about), sections(:home)], a.sections
0
   end
0
 
...
3
4
5
6
7
8
9
10
11
12
 
13
14
 
 
 
 
 
 
 
15
16
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
19
20
21
22
 
23
24
25
26
27
 
28
29
30
...
3
4
5
 
 
 
 
 
6
 
7
8
9
10
11
12
13
14
15
16
17
 
 
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 
38
39
40
41
42
 
43
44
45
46
0
@@ -3,28 +3,44 @@ require File.dirname(__FILE__) + '/../test_helper'
0
 class SiteTest < Test::Unit::TestCase
0
   fixtures :sites, :contents, :content_drafts, :attachments, :db_files
0
   set_fixture_class :content_drafts => Article::Draft
0
-
0
- # Replace this with your real tests.
0
- def test_truth
0
- assert_kind_of Site, sites(:first)
0
- end
0
   
0
- def test_valid_host
0
+ def test_should_validate_host
0
     assert_valid sites(:first)
0
     assert_equal true, Site.create(:host => sites(:first).host, :title => 'Copy').new_record?
0
+ end
0
+
0
+ def test_should_set_default_comment_behavior
0
+ site = Site.new :host => 'foo'
0
+ assert site.valid?, site.errors.full_messages.to_sentence
0
+ assert site.accept_comments?
0
+ assert !site.approve_comments?
0
   end
0
-
0
- def test_articles
0
+
0
+ def test_should_create_section_without_accepting_comments
0
+ site = Site.new :host => 'foo', :accept_comments => false
0
+ assert site.valid?, site.errors.full_messages.to_sentence
0
+ assert !site.accept_comments?
0
+ assert !site.approve_comments?
0
+ end
0
+
0
+ def test_should_create_section_with_approving_comments
0
+ site = Site.new :host => 'foo', :approve_comments => true
0
+ assert site.valid?, site.errors.full_messages.to_sentence
0
+ assert site.accept_comments?
0
+ assert site.approve_comments?
0
+ end
0
+
0
+ def test_should_find_valid_articles
0
     assert_equal contents(:welcome), sites(:first).articles.find(:first, :order => 'contents.id')
0
     assert_equal contents(:cupcake_welcome), sites(:hostess).articles.find(:first, :order => 'contents.id')
0
   end
0
   
0
- def test_find_host
0
+ def test_should_find_host
0
     assert_equal sites(:first), Site.find_by_host('test.host')
0
     assert_equal sites(:hostess), Site.find_by_host('cupcake.host')
0
   end
0
   
0
- def test_find_drafts
0
+ def test_should_find_drafts
0
     assert_equal [content_drafts(:first), content_drafts(:welcome)], sites(:first).drafts
0
     assert_equal [content_drafts(:cupcake_unfinished), content_drafts(:cupcake_welcome)], sites(:hostess).drafts
0
   end

Comments

    No one has commented yet.