Skip to content

Instantly share code, notes, and snippets.

@nothingmuch
Created May 6, 2009 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nothingmuch/107576 to your computer and use it in GitHub Desktop.
Save nothingmuch/107576 to your computer and use it in GitHub Desktop.
use strict;
use warnings;
use Test::More 'no_plan';
use ok 'Kitten::Friend::Model::KiokuDB';
my $m = Kitten::Friend::Model::KiokuDB->new( dsn => "hash" );
{
my $s = $m->new_scope;
my $id = $m->insert_kitten(
Kitten::Friend::Schema::Kitten->new(
name => "Kitteh",
id => "kitteh",
password => crypt_password("s33krit"),
),
);
ok( $id, "got an ID" );
my $kitten = $m->lookup($id);
isa_ok( $kitten, "Kitten::Friend::Schema::Kitten", "looked up object" );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment