I want to test a controller action that when accessed via GET is supposed to
prepopulate and display a form. I've discovered that
$this->assertQueryContentContains('input#comments', 'bla bla bla');
fails even when calling the action in a browser -- or printing the response
body to the console in the test -- clearly shows 'bla bla bla' in the
'comments' field.
It finally ocurred to me that 'bla bla bla' really isn't the content, it's
the value of the element's 'value' attribute. Therefore the failure is the
correct result, technically (stupid computers!). So, I tried
$this->assertQuery('input[value="bla bla bla"]')
but that doesn't do it either. What's the right way to do it?
Thanks.
--
Demand health care for everyone:
http://mobilizeforhealthcare.org/
--
David Mintz
http://davidmintz.org/