diff options
author | Philip Arndt <parndt@gmail.com> | 2012-01-17 16:56:03 +1300 |
---|---|---|
committer | Philip Arndt <parndt@gmail.com> | 2012-01-17 16:56:24 +1300 |
commit | b1e4fd00943a160f3eb6ce242463c0cc07a406fc (patch) | |
tree | 07fb750aa580b63d39c23589997956bf3a03594d /spec/requests/refinery/blog/admin | |
parent | b3a25c1b686d205fc6b8b409a8f90059ae6b934d (diff) | |
download | refinerycms-blog-b1e4fd00943a160f3eb6ce242463c0cc07a406fc.tar.gz refinerycms-blog-b1e4fd00943a160f3eb6ce242463c0cc07a406fc.tar.bz2 refinerycms-blog-b1e4fd00943a160f3eb6ce242463c0cc07a406fc.zip |
Fixed namespacing for Refinery conventions.
Diffstat (limited to 'spec/requests/refinery/blog/admin')
-rw-r--r-- | spec/requests/refinery/blog/admin/comments_spec.rb | 5 | ||||
-rw-r--r-- | spec/requests/refinery/blog/admin/posts_spec.rb | 10 |
2 files changed, 5 insertions, 10 deletions
diff --git a/spec/requests/refinery/blog/admin/comments_spec.rb b/spec/requests/refinery/blog/admin/comments_spec.rb index b1a5afe..d56e1f1 100644 --- a/spec/requests/refinery/blog/admin/comments_spec.rb +++ b/spec/requests/refinery/blog/admin/comments_spec.rb @@ -19,7 +19,6 @@ module Refinery page.should have_content('there are no new comments') end end - context "when has new unapproved comments" do let!(:blog_comment) { FactoryGirl.create(:blog_comment) } before(:each) { visit refinery_blog_admin_comments_path } @@ -54,7 +53,6 @@ module Refinery page.should have_content('there are no approved comments') end end - context "when has approved comments" do let!(:blog_comment) do FactoryGirl.create(:blog_comment, @@ -86,7 +84,6 @@ module Refinery page.should have_content('there are no rejected comments') end end - context "when has rejected comments" do let!(:blog_comment) do FactoryGirl.create(:blog_comment, @@ -110,12 +107,10 @@ module Refinery describe "#show" do let!(:blog_comment) { FactoryGirl.create(:blog_comment) } before(:each) { visit refinery_blog_admin_comment_path(blog_comment) } - it "should display the comment" do page.should have_content(blog_comment.body) page.should have_content(blog_comment.name) end - it "should allow me to approve the comment" do click_link "Approve this comment" diff --git a/spec/requests/refinery/blog/admin/posts_spec.rb b/spec/requests/refinery/blog/admin/posts_spec.rb index 6c50c37..219fd13 100644 --- a/spec/requests/refinery/blog/admin/posts_spec.rb +++ b/spec/requests/refinery/blog/admin/posts_spec.rb @@ -36,7 +36,7 @@ module Refinery describe "create blog post" do before(:each) do fill_in "Title", :with => "This is my blog post" - fill_in "blog_post_body", :with => "And I love it" + fill_in "post_body", :with => "And I love it" check blog_category.title click_button "Save" end @@ -53,7 +53,7 @@ module Refinery subject.class.first.author.should eq(::Refinery::User.last) end - it "should save categories" do + it "should save categories", :focus => true do subject.class.last.categories.count.should eq(1) subject.class.last.categories.first.title.should eq(blog_category.title) end @@ -63,7 +63,7 @@ module Refinery before(:each) do @tag_list = "chicago, bikes, beers, babes" fill_in "Title", :with => "This is a tagged blog post" - fill_in "blog_post_body", :with => "And I also love it" + fill_in "post_body", :with => "And I also love it" fill_in "Tags", :with => @tag_list click_button "Save" end @@ -118,7 +118,7 @@ module Refinery it "redirects to blog post in the frontend" do click_link "View this blog post live" - current_path.should == blog_post_path(blog_post) + current_path.should == refinery_blog_post_path(blog_post) page.should have_content(blog_post.title) end end @@ -151,7 +151,7 @@ module Refinery click_link "Create new post" fill_in "Title", :with => "This is some other guy's blog post" - fill_in "blog_post_body", :with => "I totally didn't write it." + fill_in "post_body", :with => "I totally didn't write it." click_link "Advanced Options" |