diff options
author | Philip Arndt <git@p.arndt.io> | 2015-03-05 11:52:10 +1300 |
---|---|---|
committer | Philip Arndt <git@p.arndt.io> | 2015-03-05 12:38:47 +1300 |
commit | b4064c760b80c99850527d50984cc6e611168a05 (patch) | |
tree | 69ac21bb3dc134bf8934ad4f347e47187f88d7c5 /spec/features/refinery | |
parent | dff7379738dd1318783dd3135a59a480d3f1432f (diff) | |
download | refinerycms-blog-b4064c760b80c99850527d50984cc6e611168a05.tar.gz refinerycms-blog-b4064c760b80c99850527d50984cc6e611168a05.tar.bz2 refinerycms-blog-b4064c760b80c99850527d50984cc6e611168a05.zip |
Fixed test failures relating to not finding the title.
Diffstat (limited to 'spec/features/refinery')
-rw-r--r-- | spec/features/refinery/blog/admin/categories_spec.rb | 8 | ||||
-rw-r--r-- | spec/features/refinery/blog/admin/posts_spec.rb | 4 |
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 |