Cond.t 411B

1234567891011121314151617181920
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. use Test::More;
  5. use lib 'lib';
  6. use helper;
  7. BEGIN { use_ok( 'SugarTrail::Template::Condition' ); }
  8. require_ok( 'SugarTrail::Template::Condition' );
  9. my $params = { os => "wxx", proto => "imap" };
  10. my $c = SugarTrail::Template::Condition->new('proto==imap');
  11. ok($c, "c is true");
  12. ok($c->match($params), "params match");
  13. &helper::dmupp(condition=>$c);
  14. done_testing();