Changeset 22815


Ignore:
Timestamp:
09/09/10 10:23:54 (17 months ago)
Author:
alex
Message:

CI prior to merging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/mnw21/pathquery_refactor/intermine/perl/t/10_acceptance/01_live_test.t

    r22676 r22815  
    77 
    88my $url = 'localhost:8080/intermine-test/service'; 
     9#my $url = 'web2:8080/new-pathquery/service'; 
    910my @view = ('Employee.name', 'Employee.age', 'Employee.fullTime', 
    1011        'Employee.address.address', 'Employee.department.name', 
     
    9394my $res; 
    9495 
     96$q = $module->new_query; 
     97$q->add_view(@view); 
     98 
     99#diag($q2->url, "=>\n" , $q2->results(as => 'string')); 
     100 
    95101lives_ok( 
    96102    sub {$res = $q->results}, 
    97103    "Queries for results", 
    98 ) or diag($q->url);; 
     104) or diag($q->url); 
    99105 
    100106is(ref $res, 'ARRAY', "And it is an arrayref"); 
     
    102108is(ref $res->[0], 'ARRAY', "An array of arrays in fact"); 
    103109 
    104 is($res->[1][3], "Chédin S", "With the right fields"); 
     110is($res->[1][1], "20", "With the right fields - Int") or diag(explain $res);; 
     111is($res->[1][3], "Employee Street, AVille", "With the right fields - Str") or diag(explain $res);; 
     112 
     113$q->add_constraint( 
     114    path  => 'Employee.age', 
     115    op    => '<', 
     116    value => 35, 
     117); 
    105118 
    106119lives_ok( 
     
    109122); 
    110123 
    111 is($res->[1]->{'Employee.address.address'}, "Chédin S", "with the right fields"); 
     124is(@$res, 3, "Gets the right number of records"); 
     125is($res->[1]->{'Employee.age'}, "20", "with the right fields - Int"); 
     126is($res->[1]->{'Employee.address.address'}, "Employee Street, AVille", "with the right fields - Str"); 
    112127 
    113128my $t; 
     
    122137 
    123138lives_ok( 
    124     sub {$res = $t->results_with(valueA => 'foo');}, 
     139    sub {$res = $t->results_with(valueA => 10);}, 
    125140    "Runs results with ok", 
    126 ); 
     141) or diag($t->url); 
    127142 
    128 is($res->[1][3], "Chédin S", "With the right fields"); 
     143is($res->[1][3], "Chédin S", "With the right fields") 
     144    or diag($t->url, explain $res), diag $t->show_constraints; 
    129145 
    130 is($t->results->[1][3],  "Chédin S", "And ditto for results"); 
     146#is($t->results->[1][3],  "Chédin S", "And ditto for results") or diag($t->url, explain $res); 
Note: See TracChangeset for help on using the changeset viewer.