Skip to content

Commit

Permalink
Modified core fixture to contain data for two tables.
Browse files Browse the repository at this point in the history
Modified load-fixtures test to expect this result.
Test fails. Hash::Merge::merge at line 432 of Test::DBIx::Class.pm doesn't cope with merging an arrayref of hashrefs (multi table fixture) with plain hashref (single table fixture)
  • Loading branch information
carlvincent committed Sep 16, 2009
1 parent d889b64 commit 7168d75
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 22 deletions.
4 changes: 4 additions & 0 deletions t/04-load-fixtures.t
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ use Test::More; {
["Vincent", 15, "vincent\@home.com"],
["Vanessa", 35, "vanessa\@school.com"],
],
Company => [
["name"],
["Acme"],
],
a => 100,
b => 2,
},
Expand Down
56 changes: 34 additions & 22 deletions t/etc/fixtures/core.pl
Original file line number Diff line number Diff line change
@@ -1,24 +1,36 @@
$VAR1 = {
'Person' => [
[
'name',
'age',
'email'
$VAR1 = [
{
'Person' => [
[
'name',
'age',
'email'
],
[
'John',
'40',
'[email protected]'
],
[
'Vincent',
'15',
'[email protected]'
],
[
'Vanessa',
'35',
'[email protected]'
]
],
[
'John',
'40',
'[email protected]'
},
{
'Company' => [
[
'name',
],
[
'Acme',
],
],
[
'Vincent',
'15',
'[email protected]'
],
[
'Vanessa',
'35',
'[email protected]'
]
]
};
},
];

0 comments on commit 7168d75

Please sign in to comment.