I am having some trouble figuring out the magic words. My response body
contains this:

<input type="checkbox" name="person[active]" id="person_active" value="1"
checked="checked" />

In the controller test, I when I say

     $this->assertQuery('#person_active');

the assertion succeeds, but

     $this->assertQuery('#person_active[checked="checked"]');

fails with 'Failed asserting node DENOTED BY
#person_active[checked="checked"] EXISTS.'

After diddling around with several variations, the only thing that works for
me is to assert that the containing element contains a checkbox whose
"checked" attribute is "checked:"

 $this->assertQuery('#person_active-element input[checked="checked"]') ;

It might be worth noting that the jQuery snippet

         $('#person_active[checked="checked"]').length == 1

typed into the Firebug console evaluates to true. So it looks like my CSS is
kosher.

Any ideas? Thanks.

-- 
Support real health care reform:
http://phimg.org/

--
David Mintz
http://davidmintz.org/

Reply via email to