Tests for handleAJAX