aboutsummaryrefslogtreecommitdiffstats
path: root/spec/features/refinery
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/refinery')
-rw-r--r--spec/features/refinery/blog/admin/categories_spec.rb8
-rw-r--r--spec/features/refinery/blog/admin/posts_spec.rb4
2 files changed, 6 insertions, 6 deletions
diff --git a/spec/features/refinery/blog/admin/categories_spec.rb b/spec/features/refinery/blog/admin/categories_spec.rb
index b3e3f31..7a8df8c 100644
--- a/spec/features/refinery/blog/admin/categories_spec.rb
+++ b/spec/features/refinery/blog/admin/categories_spec.rb
@@ -35,8 +35,8 @@ describe "Categories admin", type: :feature do
visit refinery.blog_admin_posts_path
click_link "Create new category"
fill_in "Title", :with => "Testing Category"
- click_button "Save"
- @c = Refinery::Blog::Category.find_by_title("Testing Category")
+ expect { click_button "Save" }.to change(Refinery::Blog::Category, :count).by(1)
+ @c = Refinery::Blog::Category.by_title("Testing Category")
end
it "suceeds" do
@@ -76,8 +76,8 @@ describe "Categories admin", type: :feature do
click_link "RU"
end
fill_in "Title", :with => ru_category_title
- click_button "Save"
- @c = Refinery::Blog::Category.find_by_title(ru_category_title)
+ expect { click_button "Save" }.to change(Refinery::Blog::Category, :count).by(1)
+ @c = Refinery::Blog::Category.by_title(ru_category_title)
end
it "suceeds" do
diff --git a/spec/features/refinery/blog/admin/posts_spec.rb b/spec/features/refinery/blog/admin/posts_spec.rb
index 230b64c..9faf061 100644
--- a/spec/features/refinery/blog/admin/posts_spec.rb
+++ b/spec/features/refinery/blog/admin/posts_spec.rb
@@ -200,7 +200,7 @@ module Refinery
fill_in "Title", :with => "Post"
fill_in "post_body", :with => "One post in my blog"
click_button "Save"
- @p = Refinery::Blog::Post.find_by_title("Post")
+ @p = Refinery::Blog::Post.by_title("Post")
end
it "succeeds" do
@@ -239,7 +239,7 @@ module Refinery
fill_in "Title", :with => ru_page_title
fill_in "post_body", :with => "One post in my blog"
click_button "Save"
- @p = Refinery::Blog::Post.find_by_title(ru_page_title)
+ @p = Refinery::Blog::Post.by_title(ru_page_title)
end
it "succeeds" do