aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorJamie Winsor <jamie@enmasse.com>2011-07-28 17:22:26 -0700
committerJamie Winsor <jamie@enmasse.com>2011-07-28 17:29:34 -0700
commita70ea17038b510df7dfea0997d92d051e6cc65e5 (patch)
tree899bfbde240f3636064ee85bb37fb9c53b328098 /spec
parent17f08ab5cb47e7d4d90385f1150e2373ed1abfa9 (diff)
downloadrefinerycms-blog-a70ea17038b510df7dfea0997d92d051e6cc65e5.tar.gz
refinerycms-blog-a70ea17038b510df7dfea0997d92d051e6cc65e5.tar.bz2
refinerycms-blog-a70ea17038b510df7dfea0997d92d051e6cc65e5.zip
Update translation scopes
Update url helpers in public views Various uninitialized constant fixes for public views & controllers Add some request specs to test what was fixed in this commit
Diffstat (limited to 'spec')
-rw-r--r--spec/requests/blog_categories_spec.rb19
-rw-r--r--spec/requests/blog_posts_spec.rb20
2 files changed, 39 insertions, 0 deletions
diff --git a/spec/requests/blog_categories_spec.rb b/spec/requests/blog_categories_spec.rb
new file mode 100644
index 0000000..b98fdf5
--- /dev/null
+++ b/spec/requests/blog_categories_spec.rb
@@ -0,0 +1,19 @@
+require "spec_helper"
+
+describe "blog categories" do
+ before(:each) do
+ @blog_post = Factory(:blog_post, :title => "Refinery CMS blog post")
+ @blog_category = Factory(:blog_category, :title => "Video Games")
+ @blog_post.categories << @blog_category
+ @blog_post.save!
+ end
+
+ context "has posts" do
+ it "displays category's blog posts" do
+ visit blog_category_path(@blog_category)
+ page.should have_content("Refinery CMS blog post")
+ page.should have_content("Video Games")
+ end
+ end
+
+end
diff --git a/spec/requests/blog_posts_spec.rb b/spec/requests/blog_posts_spec.rb
new file mode 100644
index 0000000..f89ba9a
--- /dev/null
+++ b/spec/requests/blog_posts_spec.rb
@@ -0,0 +1,20 @@
+require "spec_helper"
+
+describe "blog" do
+ it "displays the blog rss feed" do
+ get blog_rss_feed_path
+ response.should be_success
+ response.content_type.should eq("application/rss+xml")
+ end
+
+ describe "posts" do
+ let!(:blog_post) { Factory(:blog_post, :title => "Refinery CMS blog post") }
+
+ context "has blog posts" do
+ it "Displays blog post" do
+ visit blog_post_path(blog_post)
+ page.should have_content("Refinery CMS blog post")
+ end
+ end
+ end
+end