aboutsummaryrefslogtreecommitdiffstats
path: root/features
diff options
context:
space:
mode:
authorUģis Ozols <ugis.ozolss@gmail.com>2010-12-07 09:09:55 +0200
committerUģis Ozols <ugis.ozolss@gmail.com>2010-12-07 09:09:55 +0200
commit9ff63388f31b20f1ce76b9bc61147720b801dfae (patch)
tree43333f8385e24655f466fa49063920ce0324bea7 /features
parentffa7b65e82038afd499459afd4c3fd9ad0538e9f (diff)
downloadrefinerycms-blog-9ff63388f31b20f1ce76b9bc61147720b801dfae.tar.gz
refinerycms-blog-9ff63388f31b20f1ce76b9bc61147720b801dfae.tar.bz2
refinerycms-blog-9ff63388f31b20f1ce76b9bc61147720b801dfae.zip
Added some rspec tests for blog post model.
Diffstat (limited to 'features')
-rw-r--r--features/support/factories/blog_categories.rb2
-rw-r--r--features/support/factories/blog_posts.rb4
2 files changed, 4 insertions, 2 deletions
diff --git a/features/support/factories/blog_categories.rb b/features/support/factories/blog_categories.rb
index 10b51b5..eaf025c 100644
--- a/features/support/factories/blog_categories.rb
+++ b/features/support/factories/blog_categories.rb
@@ -1,4 +1,4 @@
Factory.define(:blog_category) do |f|
- f.title "Shopping"
+ f.sequence(:title) { |n| "Shopping #{n}" }
f.posts {|p| [p.association(:post)]}
end
diff --git a/features/support/factories/blog_posts.rb b/features/support/factories/blog_posts.rb
index 8dd3f54..24436b8 100644
--- a/features/support/factories/blog_posts.rb
+++ b/features/support/factories/blog_posts.rb
@@ -1,4 +1,6 @@
Factory.define(:post, :class => BlogPost) do |f|
- f.title "Top Ten Shopping Centers in Chicago"
+ f.sequence(:title) { |n| "Top #{n} Shopping Centers in Chicago" }
f.body "These are the top ten shopping centers in Chicago. You're going to read a long blog post about them. Come to peace with it."
+ f.draft false
+ f.published_at Time.now
end