Skip to content

Commit

Permalink
test no bad debt is left behind after litePsm migration
Browse files Browse the repository at this point in the history
  • Loading branch information
oddaf committed Aug 21, 2024
1 parent ec331dd commit 9d1cea5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/DssSpell.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,8 @@ contract DssSpellTest is DssSpellTestBase {
(uint256 pdstInk, uint256 pdstArt) = vat.urns(DST_ILK, address(dstPsm));
uint256 pdstVatGem = vat.gem(DST_ILK, address(dstPsm));
uint256 pdstGemBalance = gem.balanceOf(address(pocket));
uint256 pvice = vat.vice();
uint256 ppauseSin = vat.sin(pauseProxy);

uint256 expectedMoveWad = _min(psrcInk, _subcap(psrcInk, srcKeep));

Expand Down Expand Up @@ -1015,6 +1017,10 @@ contract DssSpellTest is DssSpellTestBase {
assertEq(dstPsm.buf(), dstBuf, "after: invalid dst buf");
assertEq(dstPsm.vow(), address(vow), "after: unexpected dst vow update");

// No bad debt is left behind
assertEq(vat.vice(), pvice);
assertEq(vat.sin(pauseProxy), ppauseSin);

// Old PSM state is set correctly
{
(uint256 srcInk, uint256 srcArt) = vat.urns(SRC_ILK, address(srcPsm));
Expand Down

0 comments on commit 9d1cea5

Please sign in to comment.