Cleaning up the logic
- With that class, write a test:
use Test::More tests => 2;
my $db = DBICx::TestDatabase->new('MyApp::Schema');
my $user = $db->resultset('User')->create( ... );
my $logic = WeirdLogic->new( schema => $db, user => $user );
ok $logic;
$logic->frobnicate('OH HAI');
is $db->..., 'OH HAI', 'it works';