diff options
author | Philip Arndt <parndt@gmail.com> | 2011-07-28 17:49:47 -0700 |
---|---|---|
committer | Philip Arndt <parndt@gmail.com> | 2011-07-28 17:49:47 -0700 |
commit | f0c2eb98675a4f6862d9ba41ace39a39c7811f7a (patch) | |
tree | 899bfbde240f3636064ee85bb37fb9c53b328098 /spec | |
parent | 17f08ab5cb47e7d4d90385f1150e2373ed1abfa9 (diff) | |
parent | a70ea17038b510df7dfea0997d92d051e6cc65e5 (diff) | |
download | refinerycms-blog-f0c2eb98675a4f6862d9ba41ace39a39c7811f7a.tar.gz refinerycms-blog-f0c2eb98675a4f6862d9ba41ace39a39c7811f7a.tar.bz2 refinerycms-blog-f0c2eb98675a4f6862d9ba41ace39a39c7811f7a.zip |
Merge pull request #105 from enmasse-entertainment/rails31-compatability-fixes
Rails31 compatability fixes
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/blog_categories_spec.rb | 19 | ||||
-rw-r--r-- | spec/requests/blog_posts_spec.rb | 20 |
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 |