Tests for sendmail()

40 views
Skip to first unread message

michael....@heureka.com

unread,
Jan 31, 2022, 5:48:46 AM1/31/22
to CFWheels
Hi all,

i created a file for sendmail() and now I want to create tests for this file. I thought I do the same as with a partial...

Tests partial:

    function testCardTitleFilled() {
        uid = createUUID();
        result=_controller.includePartial(partial="/shared/_card-title", title=uid);
        assert("FindNoCase(uid, result)");
    }

When I try this for the partial I use for sendmail, the variables.local-Scope doesn't exists and for the mailing I needed the variables scope (without local).

How can I test the template I use for sendmail()?

Thanks for your support.

Michael

michael....@heureka.com

unread,
Jan 31, 2022, 5:53:07 AM1/31/22
to CFWheels
I am sure someone alredy created a internet law for this - in same second you ask for help in public, you find yourself a solution.

<CFIF StructKeyExists(variables, "local")>
  <CFSET structAppend(variables, variables.local, true)>
</CFIF>

Have a nice day!

Michael
Reply all
Reply to author
Forward
0 new messages