writing tests for pledges