diff --git a/test/FlowtyWrapped_tests.cdc b/test/FlowtyWrapped_tests.cdc index e0a2bd1..6ef6750 100644 --- a/test/FlowtyWrapped_tests.cdc +++ b/test/FlowtyWrapped_tests.cdc @@ -212,11 +212,11 @@ pub fun testDrawRaffle() { let createEvent = (Test.eventsOfType(Type()).removeLast() as! FlowtyRaffles.RaffleCreated) setupForMint(acct: acct, name: username) - let entries: AnyStruct = scriptExecutor("raffle/get_raffle_entries.cdc", [minterAccount.address, createEvent.raffleID]) - let castedEntries = entries! as! [AnyStruct] + let entries: AnyStruct = scriptExecutor("raffle/get_raffle_entries.cdc", [minterAccount.address, createEvent.raffleID])! + let castedEntries = entries as! [AnyStruct] assert(castedEntries.length >= 1, message: "no entries") - assert(castedEntries.removeLast() as! Address == acct.address) + assert(castedEntries[castedEntries.length - 1] as! Address == acct.address) let drawing = drawFromRaffle(rafflesAcct, createEvent.raffleID)