From b8443d66a4f522167fd843995674336a552eca37 Mon Sep 17 00:00:00 2001 From: SidestreamColdMelon Date: Thu, 17 Oct 2024 13:16:37 +0200 Subject: [PATCH] add testNewOsmMomAddition --- src/DssSpell.t.sol | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/DssSpell.t.sol b/src/DssSpell.t.sol index d6283f4f..5c668e7e 100644 --- a/src/DssSpell.t.sol +++ b/src/DssSpell.t.sol @@ -1001,4 +1001,21 @@ contract DssSpellTest is DssSpellTestBase { assertEq(spot, 0, _concat("TestError/non-zero-spot-price-after-cull-", ilk)); } } + + function testNewOsmMomAddition() public { + bytes32 ilk = "LSE-MKR-A"; + address osm = addr.addr("PIP_MKR"); + + assertEq(osmMom.osms(ilk), address(0), "TestError/osm-already-in-mom"); + + _vote(address(spell)); + _scheduleWaitAndCast(address(spell)); + assertTrue(spell.done(), "TestError/spell-not-done"); + + assertEq(osmMom.osms(ilk), osm, "TestError/osm-not-in-mom"); + + assertEq(OsmAbstract(osm).stopped(), 0, "TestError/unexpected-stopped-before"); + vm.prank(chief.hat()); osmMom.stop(ilk); + assertEq(OsmAbstract(osm).stopped(), 1, "TestError/unexpected-stopped-after"); + } }