Add tests for ajax