aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Arndt <git@p.arndt.io>2015-03-05 13:04:05 +1300
committerPhilip Arndt <git@p.arndt.io>2015-03-05 13:14:11 +1300
commit6495058a6e524f02d955bddd1dce7afa83fb97f6 (patch)
tree40b98fa22c748c9bbc5f52c4e2df962400ff5ba9
parent4f0b29b5d18dad27317b36a763e455b76a9136c2 (diff)
downloadrefinerycms-blog-6495058a6e524f02d955bddd1dce7afa83fb97f6.tar.gz
refinerycms-blog-6495058a6e524f02d955bddd1dce7afa83fb97f6.tar.bz2
refinerycms-blog-6495058a6e524f02d955bddd1dce7afa83fb97f6.zip
Use have_selector API for greater test reliability.
-rw-r--r--spec/features/refinery/blog/admin/posts_spec.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/features/refinery/blog/admin/posts_spec.rb b/spec/features/refinery/blog/admin/posts_spec.rb
index 9faf061..00a60b8 100644
--- a/spec/features/refinery/blog/admin/posts_spec.rb
+++ b/spec/features/refinery/blog/admin/posts_spec.rb
@@ -48,8 +48,9 @@ module Refinery
click_link "toggle_advanced_options"
expect(page).to have_css '.blog_categories'
expect(page).to have_css "#post_category_ids_#{blog_category.id}"
+ expect(page).to have_selector("#post_category_ids_#{blog_category.id}:not(:checked)")
check blog_category.title
- expect(find(:css, "#post_category_ids_#{blog_category.id}").checked?).to be_truthy
+ expect(page).to have_selector("#post_category_ids_#{blog_category.id}:checked")
click_button "Save"
expect(page).to have_content("was successfully added.")
end