AJAX calls no longer generate flash messages.

[coverage] add unit test for JSON request and assert that the flash message is *not* added.