extra info fixed and test amended and fixtures changed

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

View File

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

View File

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

View File

@ -99,8 +99,8 @@ my $org1 = {
street_name => 'Test Street',
town => 'Lancaster',
postcode => 'LA1 1AF',
latitude => 54.04725,
longitude => -2.79611,
latitude => 54.04725,
longitude => -2.79611,
},
user => {
email => 'org1@example.com',
@ -115,13 +115,16 @@ my $org2 = {
street_name => 'Test Street',
town => 'Lancaster',
postcode => 'LA1 1AG',
latitude => 54.04679,
longitude => -2.7963,
latitude => 54.04679,
longitude => -2.7963,
},
user => {
email => 'org2@example.com',
password => 'abc123',
},
associations => {
lis => 1,
},
type => "organisation",
};
@ -207,4 +210,3 @@ $fixtures->dump({
schema => $schema,
directory => "$Bin/../data/" . $data_set,
});

View File

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

View File

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

View File

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

View File

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

View File

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