Skip to content

Commit

Permalink
TestGetRaffleManager (#34)
Browse files Browse the repository at this point in the history
Co-authored-by: ash <[email protected]>
  • Loading branch information
web3ashlee and ash authored Dec 20, 2023
1 parent 8cd20e3 commit 56b94aa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/raffle/borrow_raffle_manager.cdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import "FlowtyRaffles"

pub fun main(addr: Address) {
getAccount(addr).getCapability<&FlowtyRaffles.Manager{FlowtyRaffles.ManagerPublic}>(FlowtyRaffles.ManagerPublicPath).borrow()
?? panic("unable to borrow manager")
}
4 changes: 4 additions & 0 deletions test/FlowtyWrapped_tests.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ pub fun testSetupManager() {
txExecutor("setup_flowty_wrapped.cdc", [acct], [], nil)
}

pub fun testGetRaffleManager(){
scriptExecutor("raffle/borrow_raffle_manager.cdc", [rafflesAcct.address])
}

pub fun testMint() {
let acct = Test.createAccount()
setupForMint(acct: acct)
Expand Down

0 comments on commit 56b94aa

Please sign in to comment.