Updated posts controller test to use Sinon for spies.