ajaxAdapterTests: fix sinon.spy restore bug