Add more unit tests for pending authentication