Writing tests for pledge model