[jifty-devel] Testing is_distinct
carlos.arenas at gmail.com
Fri Feb 12 12:10:09 EST 2010
i am starting to put together my first jifty app, so this will
probably be the first of many simple questions...
i have been unable to get an "is_distinct" test working properly.
assume if you will that i have added "is distinct" to the title column
in the post model (in the weblog sample app in the tutorial). the
sixth test in the t/00-model-post.t file will then fail, because the
create method is being called with the same value for title (viz, a
assuming the create method returns undef on failure (i didn't see it
explicitly stated in any documentation), i change the sixth test to:
# Add another
my ($id2) = $o->create();
ok(!defined($id2), "Post create with same title failed");
but the test fails and i get a warning stating
"MyWeblog::Model::Post=HASH(0x3bf10) failed a 'is_distinct' check for
title..." with references to Jifty::DBI::Record and Jifty::Record in
can someone please point me in the right direction? thanks in advance.
More information about the jifty-devel