extra info fixed and test amended and fixtures changed

This commit is contained in:
Finn 2017-11-27 17:16:22 +00:00
parent 3f0f046c30
commit f68479b5ac
8 changed files with 80 additions and 40 deletions

View file

@ -79,6 +79,9 @@ sub index {
'organisation.name', 'organisation.name',
'organisation.latitude', 'organisation.latitude',
'organisation.longitude', 'organisation.longitude',
'organisation.street_name',
'organisation.town',
'organisation.postcode',
], ],
group_by => [ qw/ organisation.id / ], group_by => [ qw/ organisation.id / ],
}, },

View file

@ -49,6 +49,9 @@ $t->post_ok('/api/v1/supplier/location' => json => {
name => 'Test Org 2', name => 'Test Org 2',
latitude => 54.04679, latitude => 54.04679,
longitude => -2.7963, longitude => -2.7963,
street_name => 'Test Street',
town => 'Lancaster',
postcode => 'LA1 1AG',
}, },
]) ])
->json_is('/self', { ->json_is('/self', {

View file

@ -122,6 +122,9 @@ my $org2 = {
email => 'org2@example.com', email => 'org2@example.com',
password => 'abc123', password => 'abc123',
}, },
associations => {
lis => 1,
},
type => "organisation", type => "organisation",
}; };
@ -207,4 +210,3 @@ $fixtures->dump({
schema => $schema, schema => $schema,
directory => "$Bin/../data/" . $data_set, directory => "$Bin/../data/" . $data_set,
}); });

View file

@ -2,64 +2,88 @@ $VAR1 = {
'has_many' => { 'has_many' => {
'fetch' => 0 'fetch' => 0
}, },
'belongs_to' => {
'fetch' => 0
},
'might_have' => {
'fetch' => 0
},
'sets' => [ 'sets' => [
{
'class' => 'EntityAssociation',
'quantity' => 'all'
},
{
'quantity' => 'all',
'class' => 'ViewQuantisedTransactionPg'
},
{ {
'class' => 'OrganisationPayroll', 'class' => 'OrganisationPayroll',
'quantity' => 'all' 'quantity' => 'all'
}, },
{
'quantity' => 'all',
'class' => 'User'
},
{
'quantity' => 'all',
'class' => 'Customer'
},
{
'class' => 'Entity',
'quantity' => 'all'
},
{
'quantity' => 'all',
'class' => 'LeaderboardValue'
},
{ {
'quantity' => 'all', 'quantity' => 'all',
'class' => 'Feedback' 'class' => 'Feedback'
}, },
{ {
'class' => 'Organisation', 'class' => 'LeaderboardValue',
'quantity' => 'all'
},
{
'class' => 'GbPostcode',
'quantity' => 'all' 'quantity' => 'all'
}, },
{ {
'quantity' => 'all', 'quantity' => 'all',
'class' => 'LeaderboardSet' 'class' => 'GbPostcode'
},
{
'quantity' => 'all',
'class' => 'AccountToken'
}, },
{ {
'quantity' => 'all', 'quantity' => 'all',
'class' => 'SessionToken' 'class' => 'SessionToken'
}, },
{
'quantity' => 'all',
'class' => 'ViewQuantisedTransactionSQLite'
},
{
'class' => 'LeaderboardSet',
'quantity' => 'all'
},
{
'class' => 'ImportSet',
'quantity' => 'all'
},
{
'quantity' => 'all',
'class' => 'ImportValue'
},
{
'class' => 'AccountToken',
'quantity' => 'all'
},
{
'quantity' => 'all',
'class' => 'Leaderboard'
},
{ {
'quantity' => 'all', 'quantity' => 'all',
'class' => 'Transaction' 'class' => 'Transaction'
}, },
{ {
'class' => 'Leaderboard', 'quantity' => 'all',
'quantity' => 'all' 'class' => 'Organisation'
}
],
'belongs_to' => {
'fetch' => 0
}, },
'might_have' => { {
'fetch' => 0 'class' => 'Customer',
'quantity' => 'all'
},
{
'class' => 'ImportLookup',
'quantity' => 'all'
},
{
'class' => 'Entity',
'quantity' => 'all'
},
{
'quantity' => 'all',
'class' => 'User'
} }
]
}; };

View file

@ -0,0 +1,6 @@
$HASH1 = {
entity_id
=> 6,
id => 1,
lis => 1
};

View file

@ -1,6 +1,6 @@
$HASH1 = { $HASH1 = {
incode => '0AA', incode => '0AA',
latitude => 54.02493, latitude => 54.02493,
longitude => -2.80717, longitude => -2.80718,
outcode => 'LA2' outcode => 'LA2'
}; };

View file

@ -3,6 +3,7 @@ $HASH1 = {
entity_id entity_id
=> 5, => 5,
id => 1, id => 1,
is_local => undef,
latitude => 54.04725, latitude => 54.04725,
longitude longitude
=> -2.79611, => -2.79611,

View file

@ -3,6 +3,7 @@ $HASH1 = {
entity_id entity_id
=> 6, => 6,
id => 2, id => 2,
is_local => undef,
latitude => 54.04679, latitude => 54.04679,
longitude longitude
=> -2.7963, => -2.7963,