Fixed write tests to work with auth.