Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/Testing Triggers: `testRule` : Auto-build ACS instead of manually building it?Forum ↗

Testing Triggers: `testRule` : Auto-build ACS instead of manually building it?

App Development3 posts105 viewsLast activity May 2022
ST
StephenOTTOP
May 2022

From the examples to test a trigger, you use the testRule function. This function takes a ACSBuilder which is manually built from the objects provided. is there a function / way to auto-build the acs based on previous actions take in a test?

In a test, if i ran:

objA <- submit alice do
        createCmd Object1 with
            user1 = alice

objB <- submit alice do
        createCmd Object1 with
            user1 = alice

objC <- submit alice do
        createCmd Object1 with
            user1 = alice

It would generate 3 contracts in the ACS / ledger / test context. I could then run the testRule and say “use the current ACS from this test context”.

Is this possible?

CO
cocreature
May 2022

Currently this is not possible. There is an open feature request for this though.

ST
StephenOTT
May 2022

Thanks

← Back to Discussions