aboutsummaryrefslogtreecommitdiffstats
path: root/spec/requests/refinery/blog/posts_spec.rb
diff options
context:
space:
mode:
authorUģis Ozols <ugis.ozolss@gmail.com>2012-06-15 12:10:44 +0300
committerUģis Ozols <ugis.ozolss@gmail.com>2012-06-15 12:10:44 +0300
commitfc97c846689d545a2b3844c8f9810eda129c8803 (patch)
treea90182080b121ce26cd016c6adef1649cb4f3a0b /spec/requests/refinery/blog/posts_spec.rb
parent5781ea10d8d55e49439915bbed473781c9bf32fe (diff)
downloadrefinerycms-blog-fc97c846689d545a2b3844c8f9810eda129c8803.tar.gz
refinerycms-blog-fc97c846689d545a2b3844c8f9810eda129c8803.tar.bz2
refinerycms-blog-fc97c846689d545a2b3844c8f9810eda129c8803.zip
Fix failing specs.
Diffstat (limited to 'spec/requests/refinery/blog/posts_spec.rb')
-rw-r--r--spec/requests/refinery/blog/posts_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/requests/refinery/blog/posts_spec.rb b/spec/requests/refinery/blog/posts_spec.rb
index b6cc7ca..380e600 100644
--- a/spec/requests/refinery/blog/posts_spec.rb
+++ b/spec/requests/refinery/blog/posts_spec.rb
@@ -157,6 +157,7 @@ module Refinery
describe "#show draft preview" do
let(:blog_post) { FactoryGirl.create(:blog_post_draft) }
+
context "when logged in as admin" do
it "should display the draft notification" do
visit refinery.blog_post_path(blog_post)
@@ -164,8 +165,11 @@ module Refinery
page.should have_content('This page is NOT live for public viewing.')
end
end
+
context "when not logged in as an admin" do
- before(:each) { visit refinery.destroy_refinery_user_session_path }
+ before do
+ visit refinery.logout_path
+ end
it "should not display the blog post" do
visit refinery.blog_post_path(blog_post)