~ubuntu-branches/ubuntu/precise/libjifty-dbi-perl/precise

« back to all changes in this revision

Viewing changes to t/11schema_records.t

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Yu
  • Date: 2010-12-25 20:52:02 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20101225205202-lnacq0abuqygrlhm
Tags: 0.64-1
* New upstream release
* Refresh copyright information
* Use new 3.0 (quilt) source format
* Standards-Version 3.9.1 (no changes)
* Drop version deps satisfied by oldstable
* POD tests are now author-only

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
BEGIN { require "t/utils.pl" }
10
10
our (@available_drivers);
11
11
 
12
 
use constant TESTS_PER_DRIVER => 67;
 
12
use constant TESTS_PER_DRIVER => 68;
13
13
 
14
14
my $total = scalar(@available_drivers) * TESTS_PER_DRIVER;
15
15
plan tests => $total;
35
35
        ok($e_id, "Got an id for the new employee: $e_id");
36
36
        $emp->load($e_id);
37
37
        is($emp->id, $e_id);
38
 
        
 
38
        is($emp->pid, $$);
 
39
 
39
40
        my $phone_collection = $emp->phones;
40
41
        isa_ok($phone_collection, 'TestApp::PhoneCollection');
41
42
 
265
266
BEGIN {
266
267
    use Jifty::DBI::Schema;
267
268
    use Jifty::DBI::Record schema {
268
 
    column name => type is 'varchar';
269
 
    column phones => references TestApp::PhoneCollection by 'employee';
270
 
    }
 
269
        column name => type is 'varchar';
 
270
        column phones => references TestApp::PhoneCollection by 'employee';
 
271
        column pid => is computed;
 
272
    };
 
273
 
 
274
    sub pid { $$ }
271
275
}
272
276
 
273
277
sub _value  {