writing tests for pledging