Add tests for handle ajax.