aboutsummaryrefslogtreecommitdiffstats
path: root/spec/requests
diff options
context:
space:
mode:
authorUģis Ozols <ugis.ozolss@gmail.com>2011-08-03 13:54:07 +0300
committerUģis Ozols <ugis.ozolss@gmail.com>2011-08-03 13:54:07 +0300
commitfddcebd878a03f579bb3c1a3265fa9cc9ef427c0 (patch)
tree1f4a20daf9e6251aad23223da70aa3aea70ce66d /spec/requests
parent476ad3f15810455fd40cc8374af1a253471b296c (diff)
downloadrefinerycms-blog-fddcebd878a03f579bb3c1a3265fa9cc9ef427c0.tar.gz
refinerycms-blog-fddcebd878a03f579bb3c1a3265fa9cc9ef427c0.tar.bz2
refinerycms-blog-fddcebd878a03f579bb3c1a3265fa9cc9ef427c0.zip
Make those specs green again.
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/blog_categories_spec.rb6
-rw-r--r--spec/requests/blog_posts_spec.rb6
-rw-r--r--spec/requests/manage_blog_posts_spec.rb11
3 files changed, 3 insertions, 20 deletions
diff --git a/spec/requests/blog_categories_spec.rb b/spec/requests/blog_categories_spec.rb
index d0682b6..2ba5f82 100644
--- a/spec/requests/blog_categories_spec.rb
+++ b/spec/requests/blog_categories_spec.rb
@@ -1,11 +1,7 @@
require "spec_helper"
describe "blog categories" do
- before(:all) do
- # destroy all existing (if any) users before creating new one
- Refinery::User.destroy_all
- Factory(:refinery_user)
- end
+ login_refinery_user
before(:each) do
@blog_post = Factory(:blog_post, :title => "Refinery CMS blog post")
diff --git a/spec/requests/blog_posts_spec.rb b/spec/requests/blog_posts_spec.rb
index 284bd07..e7ab573 100644
--- a/spec/requests/blog_posts_spec.rb
+++ b/spec/requests/blog_posts_spec.rb
@@ -1,11 +1,7 @@
require "spec_helper"
describe "blog" do
- before(:all) do
- # destroy all existing (if any) users before creating new one
- Refinery::User.destroy_all
- Factory(:refinery_user)
- end
+ login_refinery_user
it "displays the blog rss feed" do
get blog_rss_feed_path
diff --git a/spec/requests/manage_blog_posts_spec.rb b/spec/requests/manage_blog_posts_spec.rb
index 2e44c53..724cc59 100644
--- a/spec/requests/manage_blog_posts_spec.rb
+++ b/spec/requests/manage_blog_posts_spec.rb
@@ -1,16 +1,7 @@
require "spec_helper"
describe "manage blog posts" do
- # TODO: share this with other request specs
- before(:each) do
- Factory(:refinery_user, :username => "refinerycms",
- :password => "123456",
- :password_confirmation => "123456")
- visit new_refinery_user_session_url
- fill_in "Login", :with => "refinerycms"
- fill_in "Password", :with => "123456"
- click_button "Sign in"
- end
+ login_refinery_user
let!(:blog_post) { Factory(:blog_post, :title => "Refinery CMS blog post") }