From 6495058a6e524f02d955bddd1dce7afa83fb97f6 Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Thu, 5 Mar 2015 13:04:05 +1300 Subject: Use have_selector API for greater test reliability. --- spec/features/refinery/blog/admin/posts_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'spec') 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 -- cgit v1.2.3