Test API with new and index actions.