aboutsummaryrefslogtreecommitdiffstats
path: root/spec/requests/blog_posts_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/requests/blog_posts_spec.rb')
-rw-r--r--spec/requests/blog_posts_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/requests/blog_posts_spec.rb b/spec/requests/blog_posts_spec.rb
index 1eaf27a..d7d2a9f 100644
--- a/spec/requests/blog_posts_spec.rb
+++ b/spec/requests/blog_posts_spec.rb
@@ -17,4 +17,22 @@ describe "blog posts" do
response.content_type.should eq("application/rss+xml")
end
end
+
+ describe "list tagged posts" do
+ context "when has tagged blog posts" do
+ before(:each) do
+ @tag_name = "chicago"
+ @blog_post = Factory.create(:blog_post,
+ :title => "I Love my city",
+ :tag_list => @tag_name)
+ tag = ::Refinery::BlogPost.tag_counts_on(:tags).first
+ visit tagged_posts_path(tag.id, @tag_name.parameterize)
+ end
+
+ it "should have one tagged post" do
+ page.should have_content(@tag_name)
+ page.should have_content(@blog_post.title)
+ end
+ end
+ end
end