From df90f62b7adb969411c0a2d376abb23d2dac2b2f Mon Sep 17 00:00:00 2001 From: Tom Bloor Date: Tue, 26 Sep 2017 17:49:16 +0100 Subject: [PATCH] Added full test data fixture setup --- t/etc/fixtures/config/full.pl | 210 ++++++++++++++++++ t/etc/fixtures/data/full/_config_set | 65 ++++++ t/etc/fixtures/data/full/_dumper_version | 1 + t/etc/fixtures/data/full/customers/1.fix | 10 + t/etc/fixtures/data/full/customers/2.fix | 10 + t/etc/fixtures/data/full/customers/3.fix | 10 + t/etc/fixtures/data/full/customers/4.fix | 10 + t/etc/fixtures/data/full/customers/5.fix | 10 + t/etc/fixtures/data/full/entities/1.fix | 4 + t/etc/fixtures/data/full/entities/2.fix | 4 + t/etc/fixtures/data/full/entities/3.fix | 4 + t/etc/fixtures/data/full/entities/4.fix | 4 + t/etc/fixtures/data/full/entities/5.fix | 4 + t/etc/fixtures/data/full/entities/6.fix | 4 + t/etc/fixtures/data/full/entities/7.fix | 4 + .../data/full/gb_postcodes/LA1-1AA.fix | 6 + .../data/full/gb_postcodes/LA1-1AB.fix | 6 + .../data/full/gb_postcodes/LA1-1AD.fix | 6 + .../data/full/gb_postcodes/LA1-1AE.fix | 6 + .../data/full/gb_postcodes/LA1-1AF.fix | 6 + .../data/full/gb_postcodes/LA1-1AG.fix | 6 + .../data/full/gb_postcodes/LA1-1AH.fix | 6 + .../data/full/gb_postcodes/LA1-1AJ.fix | 6 + .../data/full/gb_postcodes/LA1-1AL.fix | 6 + .../data/full/gb_postcodes/LA1-1AN.fix | 6 + .../data/full/gb_postcodes/LA1-1AP.fix | 6 + .../data/full/gb_postcodes/LA2-0AA.fix | 6 + .../data/full/gb_postcodes/LA2-0AB.fix | 6 + .../data/full/gb_postcodes/LA2-0AD.fix | 6 + .../data/full/gb_postcodes/LA2-0AE.fix | 6 + .../data/full/gb_postcodes/LA2-0AG.fix | 6 + .../data/full/gb_postcodes/LA2-0AH.fix | 6 + .../data/full/gb_postcodes/LA2-0AJ.fix | 6 + .../data/full/gb_postcodes/LA2-0AN.fix | 6 + .../data/full/gb_postcodes/LA2-0AP.fix | 6 + .../data/full/gb_postcodes/LA2-0AQ.fix | 6 + .../data/full/gb_postcodes/LA2-0AR.fix | 6 + t/etc/fixtures/data/full/leaderboards/1.fix | 5 + t/etc/fixtures/data/full/leaderboards/2.fix | 5 + t/etc/fixtures/data/full/leaderboards/3.fix | 5 + t/etc/fixtures/data/full/leaderboards/4.fix | 5 + t/etc/fixtures/data/full/leaderboards/5.fix | 5 + t/etc/fixtures/data/full/leaderboards/6.fix | 5 + t/etc/fixtures/data/full/leaderboards/7.fix | 5 + t/etc/fixtures/data/full/leaderboards/8.fix | 5 + t/etc/fixtures/data/full/organisations/1.fix | 18 ++ t/etc/fixtures/data/full/organisations/2.fix | 18 ++ t/etc/fixtures/data/full/users/1.fix | 8 + t/etc/fixtures/data/full/users/2.fix | 8 + t/etc/fixtures/data/full/users/3.fix | 8 + t/etc/fixtures/data/full/users/4.fix | 8 + t/etc/fixtures/data/full/users/5.fix | 8 + t/etc/fixtures/data/full/users/6.fix | 8 + t/etc/fixtures/data/full/users/7.fix | 8 + 54 files changed, 618 insertions(+) create mode 100644 t/etc/fixtures/config/full.pl create mode 100644 t/etc/fixtures/data/full/_config_set create mode 100644 t/etc/fixtures/data/full/_dumper_version create mode 100644 t/etc/fixtures/data/full/customers/1.fix create mode 100644 t/etc/fixtures/data/full/customers/2.fix create mode 100644 t/etc/fixtures/data/full/customers/3.fix create mode 100644 t/etc/fixtures/data/full/customers/4.fix create mode 100644 t/etc/fixtures/data/full/customers/5.fix create mode 100644 t/etc/fixtures/data/full/entities/1.fix create mode 100644 t/etc/fixtures/data/full/entities/2.fix create mode 100644 t/etc/fixtures/data/full/entities/3.fix create mode 100644 t/etc/fixtures/data/full/entities/4.fix create mode 100644 t/etc/fixtures/data/full/entities/5.fix create mode 100644 t/etc/fixtures/data/full/entities/6.fix create mode 100644 t/etc/fixtures/data/full/entities/7.fix create mode 100644 t/etc/fixtures/data/full/gb_postcodes/LA1-1AA.fix create mode 100644 t/etc/fixtures/data/full/gb_postcodes/LA1-1AB.fix create mode 100644 t/etc/fixtures/data/full/gb_postcodes/LA1-1AD.fix create mode 100644 t/etc/fixtures/data/full/gb_postcodes/LA1-1AE.fix create mode 100644 t/etc/fixtures/data/full/gb_postcodes/LA1-1AF.fix create mode 100644 t/etc/fixtures/data/full/gb_postcodes/LA1-1AG.fix create mode 100644 t/etc/fixtures/data/full/gb_postcodes/LA1-1AH.fix create mode 100644 t/etc/fixtures/data/full/gb_postcodes/LA1-1AJ.fix create mode 100644 t/etc/fixtures/data/full/gb_postcodes/LA1-1AL.fix create mode 100644 t/etc/fixtures/data/full/gb_postcodes/LA1-1AN.fix create mode 100644 t/etc/fixtures/data/full/gb_postcodes/LA1-1AP.fix create mode 100644 t/etc/fixtures/data/full/gb_postcodes/LA2-0AA.fix create mode 100644 t/etc/fixtures/data/full/gb_postcodes/LA2-0AB.fix create mode 100644 t/etc/fixtures/data/full/gb_postcodes/LA2-0AD.fix create mode 100644 t/etc/fixtures/data/full/gb_postcodes/LA2-0AE.fix create mode 100644 t/etc/fixtures/data/full/gb_postcodes/LA2-0AG.fix create mode 100644 t/etc/fixtures/data/full/gb_postcodes/LA2-0AH.fix create mode 100644 t/etc/fixtures/data/full/gb_postcodes/LA2-0AJ.fix create mode 100644 t/etc/fixtures/data/full/gb_postcodes/LA2-0AN.fix create mode 100644 t/etc/fixtures/data/full/gb_postcodes/LA2-0AP.fix create mode 100644 t/etc/fixtures/data/full/gb_postcodes/LA2-0AQ.fix create mode 100644 t/etc/fixtures/data/full/gb_postcodes/LA2-0AR.fix create mode 100644 t/etc/fixtures/data/full/leaderboards/1.fix create mode 100644 t/etc/fixtures/data/full/leaderboards/2.fix create mode 100644 t/etc/fixtures/data/full/leaderboards/3.fix create mode 100644 t/etc/fixtures/data/full/leaderboards/4.fix create mode 100644 t/etc/fixtures/data/full/leaderboards/5.fix create mode 100644 t/etc/fixtures/data/full/leaderboards/6.fix create mode 100644 t/etc/fixtures/data/full/leaderboards/7.fix create mode 100644 t/etc/fixtures/data/full/leaderboards/8.fix create mode 100644 t/etc/fixtures/data/full/organisations/1.fix create mode 100644 t/etc/fixtures/data/full/organisations/2.fix create mode 100644 t/etc/fixtures/data/full/users/1.fix create mode 100644 t/etc/fixtures/data/full/users/2.fix create mode 100644 t/etc/fixtures/data/full/users/3.fix create mode 100644 t/etc/fixtures/data/full/users/4.fix create mode 100644 t/etc/fixtures/data/full/users/5.fix create mode 100644 t/etc/fixtures/data/full/users/6.fix create mode 100644 t/etc/fixtures/data/full/users/7.fix diff --git a/t/etc/fixtures/config/full.pl b/t/etc/fixtures/config/full.pl new file mode 100644 index 0000000..61c9c5e --- /dev/null +++ b/t/etc/fixtures/config/full.pl @@ -0,0 +1,210 @@ +#! /usr/bin/env perl + +use strict; +use warnings; + +use DBIx::Class::Fixtures; +use FindBin qw/ $Bin /; +use lib "$Bin/../../../../lib"; +use Pear::LocalLoop::Schema; +use DateTime; + +my $fixtures = DBIx::Class::Fixtures->new({ + config_dir => "$Bin", +}); + +my $schema = Pear::LocalLoop::Schema->connect('dbi:SQLite::memory:'); + +$schema->deploy; + +$schema->resultset('Leaderboard')->populate([ + [ qw/ name type / ], + [ 'Daily Total', 'daily_total' ], + [ 'Daily Count', 'daily_count' ], + [ 'Weekly Total', 'weekly_total' ], + [ 'Weekly Count', 'weekly_count' ], + [ 'Monthly Total', 'monthly_total' ], + [ 'Monthly Count', 'monthly_count' ], + [ 'All Time Total', 'all_time_total' ], + [ 'All Time Count', 'all_time_count' ], +]); + +my $entity1 = { + customer => { + full_name => 'Test User1', + display_name => 'Test User1', + postcode => 'LA1 1AA', + year_of_birth => 2006, + latitude => 54.04, + longitude => -2.80, + }, + user => { + email => 'test1@example.com', + password => 'abc123', + }, + type => "customer", +}; + +my $entity2 = { + customer => { + full_name => 'Test User2', + display_name => 'Test User2', + postcode => 'LA1 1AB', + year_of_birth => 2006, + latitude => 54.04, + longitude => -2.80, + }, + user => { + email => 'test2@example.com', + password => 'abc123', + }, + type => "customer", +}; + +my $entity3 = { + customer => { + full_name => 'Test User3', + display_name => 'Test User3', + postcode => 'LA1 1AD', + year_of_birth => 2006, + latitude => 54.05, + longitude => -2.80, + }, + user => { + email => 'test3@example.com', + password => 'abc123', + }, + type => "customer", +}; + +my $entity4 = { + customer => { + full_name => 'Test User4', + display_name => 'Test User4', + postcode => 'LA1 1AE', + year_of_birth => 2006, + latitude => 54.04, + longitude => -2.80, + }, + user => { + email => 'test4@example.com', + password => 'abc123', + }, + type => "customer", +}; + +my $org1 = { + organisation => { + name => 'Test Org', + street_name => 'Test Street', + town => 'Lancaster', + postcode => 'LA1 1AF', + latitude => 54.04725, + longitude => -2.79611, + }, + user => { + email => 'org1@example.com', + password => 'abc123', + }, + type => "organisation", +}; + +my $org2 = { + organisation => { + name => 'Test Org 2', + street_name => 'Test Street', + town => 'Lancaster', + postcode => 'LA1 1AG', + latitude => 54.04679, + longitude => -2.7963, + }, + user => { + email => 'org2@example.com', + password => 'abc123', + }, + type => "organisation", +}; + +my $admin = { + customer => { + full_name => 'Test Admin', + display_name => 'Test Admin', + postcode => 'LA1 1AH', + year_of_birth => 2006, + latitude => 54.05, + longitude => -2.80, + }, + user => { + email => 'admin@example.com', + password => 'abc123', + is_admin => \"1", + }, + type => "customer", +}; + +$schema->resultset('Entity')->create( $_ ) + for ( + $entity1, + $entity2, + $entity3, + $entity4, + $org1, + $org2, + $admin, +); + +use Geo::UK::Postcode::CodePointOpen; + +my $output_dir = 'etc/code-point-open/codepo_gb'; +my $cpo = Geo::UK::Postcode::CodePointOpen->new( path => $output_dir ); + +my $iter = $cpo->read_iterator( + outcodes => ['LA1'], + include_lat_long => 1, + split_postcode => 1, +); + +my $pc_rs = $schema->resultset('GbPostcode'); + +my $i = 1; +while ( my $pc = $iter->() ) { + $pc_rs->find_or_create( + { + outcode => $pc->{Outcode}, + incode => $pc->{Incode}, + latitude => $pc->{Latitude}, + longitude => $pc->{Longitude}, + }, + { key => 'primary' }, + ); + last if $i++ > 10 +} + +$iter = $cpo->read_iterator( + outcodes => ['LA2'], + include_lat_long => 1, + split_postcode => 1, +); + +$i = 1; +while ( my $pc = $iter->() ) { + $pc_rs->find_or_create( + { + outcode => $pc->{Outcode}, + incode => $pc->{Incode}, + latitude => $pc->{Latitude}, + longitude => $pc->{Longitude}, + }, + { key => 'primary' }, + ); + last if $i++ > 10 +} + +my $data_set = 'full'; + +$fixtures->dump({ + all => 1, + schema => $schema, + directory => "$Bin/../data/" . $data_set, +}); + diff --git a/t/etc/fixtures/data/full/_config_set b/t/etc/fixtures/data/full/_config_set new file mode 100644 index 0000000..bc4099f --- /dev/null +++ b/t/etc/fixtures/data/full/_config_set @@ -0,0 +1,65 @@ +$VAR1 = { + 'has_many' => { + 'fetch' => 0 + }, + 'sets' => [ + { + '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', + 'quantity' => 'all' + }, + { + 'quantity' => 'all', + 'class' => 'LeaderboardSet' + }, + { + 'quantity' => 'all', + 'class' => 'AccountToken' + }, + { + 'quantity' => 'all', + 'class' => 'SessionToken' + }, + { + 'quantity' => 'all', + 'class' => 'Transaction' + }, + { + 'class' => 'Leaderboard', + 'quantity' => 'all' + } + ], + 'belongs_to' => { + 'fetch' => 0 + }, + 'might_have' => { + 'fetch' => 0 + } + }; diff --git a/t/etc/fixtures/data/full/_dumper_version b/t/etc/fixtures/data/full/_dumper_version new file mode 100644 index 0000000..55eb15e --- /dev/null +++ b/t/etc/fixtures/data/full/_dumper_version @@ -0,0 +1 @@ +1.001039 \ No newline at end of file diff --git a/t/etc/fixtures/data/full/customers/1.fix b/t/etc/fixtures/data/full/customers/1.fix new file mode 100644 index 0000000..6694570 --- /dev/null +++ b/t/etc/fixtures/data/full/customers/1.fix @@ -0,0 +1,10 @@ +$HASH1 = { + display_name => 'Test User1', + entity_id => 1, + full_name => 'Test User1', + id => 1, + latitude => 54.04, + longitude => -2.8, + postcode => 'LA1 1AA', + year_of_birth => 2006 + }; diff --git a/t/etc/fixtures/data/full/customers/2.fix b/t/etc/fixtures/data/full/customers/2.fix new file mode 100644 index 0000000..3c8d55f --- /dev/null +++ b/t/etc/fixtures/data/full/customers/2.fix @@ -0,0 +1,10 @@ +$HASH1 = { + display_name => 'Test User2', + entity_id => 2, + full_name => 'Test User2', + id => 2, + latitude => 54.04, + longitude => -2.8, + postcode => 'LA1 1AB', + year_of_birth => 2006 + }; diff --git a/t/etc/fixtures/data/full/customers/3.fix b/t/etc/fixtures/data/full/customers/3.fix new file mode 100644 index 0000000..a5b1443 --- /dev/null +++ b/t/etc/fixtures/data/full/customers/3.fix @@ -0,0 +1,10 @@ +$HASH1 = { + display_name => 'Test User3', + entity_id => 3, + full_name => 'Test User3', + id => 3, + latitude => 54.05, + longitude => -2.8, + postcode => 'LA1 1AD', + year_of_birth => 2006 + }; diff --git a/t/etc/fixtures/data/full/customers/4.fix b/t/etc/fixtures/data/full/customers/4.fix new file mode 100644 index 0000000..16b294b --- /dev/null +++ b/t/etc/fixtures/data/full/customers/4.fix @@ -0,0 +1,10 @@ +$HASH1 = { + display_name => 'Test User4', + entity_id => 4, + full_name => 'Test User4', + id => 4, + latitude => 54.04, + longitude => -2.8, + postcode => 'LA1 1AE', + year_of_birth => 2006 + }; diff --git a/t/etc/fixtures/data/full/customers/5.fix b/t/etc/fixtures/data/full/customers/5.fix new file mode 100644 index 0000000..10472d9 --- /dev/null +++ b/t/etc/fixtures/data/full/customers/5.fix @@ -0,0 +1,10 @@ +$HASH1 = { + display_name => 'Test Admin', + entity_id => 7, + full_name => 'Test Admin', + id => 5, + latitude => 54.05, + longitude => -2.8, + postcode => 'LA1 1AH', + year_of_birth => 2006 + }; diff --git a/t/etc/fixtures/data/full/entities/1.fix b/t/etc/fixtures/data/full/entities/1.fix new file mode 100644 index 0000000..a45e065 --- /dev/null +++ b/t/etc/fixtures/data/full/entities/1.fix @@ -0,0 +1,4 @@ +$HASH1 = { + id => 1, + type => 'customer' + }; diff --git a/t/etc/fixtures/data/full/entities/2.fix b/t/etc/fixtures/data/full/entities/2.fix new file mode 100644 index 0000000..20849e3 --- /dev/null +++ b/t/etc/fixtures/data/full/entities/2.fix @@ -0,0 +1,4 @@ +$HASH1 = { + id => 2, + type => 'customer' + }; diff --git a/t/etc/fixtures/data/full/entities/3.fix b/t/etc/fixtures/data/full/entities/3.fix new file mode 100644 index 0000000..3fd6a9a --- /dev/null +++ b/t/etc/fixtures/data/full/entities/3.fix @@ -0,0 +1,4 @@ +$HASH1 = { + id => 3, + type => 'customer' + }; diff --git a/t/etc/fixtures/data/full/entities/4.fix b/t/etc/fixtures/data/full/entities/4.fix new file mode 100644 index 0000000..bacb15b --- /dev/null +++ b/t/etc/fixtures/data/full/entities/4.fix @@ -0,0 +1,4 @@ +$HASH1 = { + id => 4, + type => 'customer' + }; diff --git a/t/etc/fixtures/data/full/entities/5.fix b/t/etc/fixtures/data/full/entities/5.fix new file mode 100644 index 0000000..9aa374d --- /dev/null +++ b/t/etc/fixtures/data/full/entities/5.fix @@ -0,0 +1,4 @@ +$HASH1 = { + id => 5, + type => 'organisation' + }; diff --git a/t/etc/fixtures/data/full/entities/6.fix b/t/etc/fixtures/data/full/entities/6.fix new file mode 100644 index 0000000..b8baeb3 --- /dev/null +++ b/t/etc/fixtures/data/full/entities/6.fix @@ -0,0 +1,4 @@ +$HASH1 = { + id => 6, + type => 'organisation' + }; diff --git a/t/etc/fixtures/data/full/entities/7.fix b/t/etc/fixtures/data/full/entities/7.fix new file mode 100644 index 0000000..00b2a97 --- /dev/null +++ b/t/etc/fixtures/data/full/entities/7.fix @@ -0,0 +1,4 @@ +$HASH1 = { + id => 7, + type => 'customer' + }; diff --git a/t/etc/fixtures/data/full/gb_postcodes/LA1-1AA.fix b/t/etc/fixtures/data/full/gb_postcodes/LA1-1AA.fix new file mode 100644 index 0000000..b61c6fb --- /dev/null +++ b/t/etc/fixtures/data/full/gb_postcodes/LA1-1AA.fix @@ -0,0 +1,6 @@ +$HASH1 = { + incode => '1AA', + latitude => 54.04816, + longitude => -2.80382, + outcode => 'LA1' + }; diff --git a/t/etc/fixtures/data/full/gb_postcodes/LA1-1AB.fix b/t/etc/fixtures/data/full/gb_postcodes/LA1-1AB.fix new file mode 100644 index 0000000..5ef0e2c --- /dev/null +++ b/t/etc/fixtures/data/full/gb_postcodes/LA1-1AB.fix @@ -0,0 +1,6 @@ +$HASH1 = { + incode => '1AB', + latitude => 54.04795, + longitude => -2.80423, + outcode => 'LA1' + }; diff --git a/t/etc/fixtures/data/full/gb_postcodes/LA1-1AD.fix b/t/etc/fixtures/data/full/gb_postcodes/LA1-1AD.fix new file mode 100644 index 0000000..ed9ee81 --- /dev/null +++ b/t/etc/fixtures/data/full/gb_postcodes/LA1-1AD.fix @@ -0,0 +1,6 @@ +$HASH1 = { + incode => '1AD', + latitude => 54.05425, + longitude => -2.8071, + outcode => 'LA1' + }; diff --git a/t/etc/fixtures/data/full/gb_postcodes/LA1-1AE.fix b/t/etc/fixtures/data/full/gb_postcodes/LA1-1AE.fix new file mode 100644 index 0000000..985b110 --- /dev/null +++ b/t/etc/fixtures/data/full/gb_postcodes/LA1-1AE.fix @@ -0,0 +1,6 @@ +$HASH1 = { + incode => '1AE', + latitude => 54.04697, + longitude => -2.80403, + outcode => 'LA1' + }; diff --git a/t/etc/fixtures/data/full/gb_postcodes/LA1-1AF.fix b/t/etc/fixtures/data/full/gb_postcodes/LA1-1AF.fix new file mode 100644 index 0000000..50e02b3 --- /dev/null +++ b/t/etc/fixtures/data/full/gb_postcodes/LA1-1AF.fix @@ -0,0 +1,6 @@ +$HASH1 = { + incode => '1AF', + latitude => 54.04725, + longitude => -2.79611, + outcode => 'LA1' + }; diff --git a/t/etc/fixtures/data/full/gb_postcodes/LA1-1AG.fix b/t/etc/fixtures/data/full/gb_postcodes/LA1-1AG.fix new file mode 100644 index 0000000..683f2ff --- /dev/null +++ b/t/etc/fixtures/data/full/gb_postcodes/LA1-1AG.fix @@ -0,0 +1,6 @@ +$HASH1 = { + incode => '1AG', + latitude => 54.04679, + longitude => -2.7963, + outcode => 'LA1' + }; diff --git a/t/etc/fixtures/data/full/gb_postcodes/LA1-1AH.fix b/t/etc/fixtures/data/full/gb_postcodes/LA1-1AH.fix new file mode 100644 index 0000000..01ae3f6 --- /dev/null +++ b/t/etc/fixtures/data/full/gb_postcodes/LA1-1AH.fix @@ -0,0 +1,6 @@ +$HASH1 = { + incode => '1AH', + latitude => 54.05155, + longitude => -2.80299, + outcode => 'LA1' + }; diff --git a/t/etc/fixtures/data/full/gb_postcodes/LA1-1AJ.fix b/t/etc/fixtures/data/full/gb_postcodes/LA1-1AJ.fix new file mode 100644 index 0000000..85a20e6 --- /dev/null +++ b/t/etc/fixtures/data/full/gb_postcodes/LA1-1AJ.fix @@ -0,0 +1,6 @@ +$HASH1 = { + incode => '1AJ', + latitude => 54.04835, + longitude => -2.80416, + outcode => 'LA1' + }; diff --git a/t/etc/fixtures/data/full/gb_postcodes/LA1-1AL.fix b/t/etc/fixtures/data/full/gb_postcodes/LA1-1AL.fix new file mode 100644 index 0000000..f55b5f4 --- /dev/null +++ b/t/etc/fixtures/data/full/gb_postcodes/LA1-1AL.fix @@ -0,0 +1,6 @@ +$HASH1 = { + incode => '1AL', + latitude => 54.04807, + longitude => -2.80116, + outcode => 'LA1' + }; diff --git a/t/etc/fixtures/data/full/gb_postcodes/LA1-1AN.fix b/t/etc/fixtures/data/full/gb_postcodes/LA1-1AN.fix new file mode 100644 index 0000000..7dac9f7 --- /dev/null +++ b/t/etc/fixtures/data/full/gb_postcodes/LA1-1AN.fix @@ -0,0 +1,6 @@ +$HASH1 = { + incode => '1AN', + latitude => 54.04531, + longitude => -2.80106, + outcode => 'LA1' + }; diff --git a/t/etc/fixtures/data/full/gb_postcodes/LA1-1AP.fix b/t/etc/fixtures/data/full/gb_postcodes/LA1-1AP.fix new file mode 100644 index 0000000..7816443 --- /dev/null +++ b/t/etc/fixtures/data/full/gb_postcodes/LA1-1AP.fix @@ -0,0 +1,6 @@ +$HASH1 = { + incode => '1AP', + latitude => 54.05399, + longitude => -2.80818, + outcode => 'LA1' + }; diff --git a/t/etc/fixtures/data/full/gb_postcodes/LA2-0AA.fix b/t/etc/fixtures/data/full/gb_postcodes/LA2-0AA.fix new file mode 100644 index 0000000..3b6c044 --- /dev/null +++ b/t/etc/fixtures/data/full/gb_postcodes/LA2-0AA.fix @@ -0,0 +1,6 @@ +$HASH1 = { + incode => '0AA', + latitude => 54.02493, + longitude => -2.80717, + outcode => 'LA2' + }; diff --git a/t/etc/fixtures/data/full/gb_postcodes/LA2-0AB.fix b/t/etc/fixtures/data/full/gb_postcodes/LA2-0AB.fix new file mode 100644 index 0000000..2af49b0 --- /dev/null +++ b/t/etc/fixtures/data/full/gb_postcodes/LA2-0AB.fix @@ -0,0 +1,6 @@ +$HASH1 = { + incode => '0AB', + latitude => 54.02412, + longitude => -2.81217, + outcode => 'LA2' + }; diff --git a/t/etc/fixtures/data/full/gb_postcodes/LA2-0AD.fix b/t/etc/fixtures/data/full/gb_postcodes/LA2-0AD.fix new file mode 100644 index 0000000..6ab1805 --- /dev/null +++ b/t/etc/fixtures/data/full/gb_postcodes/LA2-0AD.fix @@ -0,0 +1,6 @@ +$HASH1 = { + incode => '0AD', + latitude => 54.02432, + longitude => -2.80635, + outcode => 'LA2' + }; diff --git a/t/etc/fixtures/data/full/gb_postcodes/LA2-0AE.fix b/t/etc/fixtures/data/full/gb_postcodes/LA2-0AE.fix new file mode 100644 index 0000000..144cbf5 --- /dev/null +++ b/t/etc/fixtures/data/full/gb_postcodes/LA2-0AE.fix @@ -0,0 +1,6 @@ +$HASH1 = { + incode => '0AE', + latitude => 54.02851, + longitude => -2.82025, + outcode => 'LA2' + }; diff --git a/t/etc/fixtures/data/full/gb_postcodes/LA2-0AG.fix b/t/etc/fixtures/data/full/gb_postcodes/LA2-0AG.fix new file mode 100644 index 0000000..b0208ac --- /dev/null +++ b/t/etc/fixtures/data/full/gb_postcodes/LA2-0AG.fix @@ -0,0 +1,6 @@ +$HASH1 = { + incode => '0AG', + latitude => 54.02071, + longitude => -2.81721, + outcode => 'LA2' + }; diff --git a/t/etc/fixtures/data/full/gb_postcodes/LA2-0AH.fix b/t/etc/fixtures/data/full/gb_postcodes/LA2-0AH.fix new file mode 100644 index 0000000..3848775 --- /dev/null +++ b/t/etc/fixtures/data/full/gb_postcodes/LA2-0AH.fix @@ -0,0 +1,6 @@ +$HASH1 = { + incode => '0AH', + latitude => 54.01159, + longitude => -2.81195, + outcode => 'LA2' + }; diff --git a/t/etc/fixtures/data/full/gb_postcodes/LA2-0AJ.fix b/t/etc/fixtures/data/full/gb_postcodes/LA2-0AJ.fix new file mode 100644 index 0000000..1b51d3c --- /dev/null +++ b/t/etc/fixtures/data/full/gb_postcodes/LA2-0AJ.fix @@ -0,0 +1,6 @@ +$HASH1 = { + incode => '0AJ', + latitude => 54.00774, + longitude => -2.82477, + outcode => 'LA2' + }; diff --git a/t/etc/fixtures/data/full/gb_postcodes/LA2-0AN.fix b/t/etc/fixtures/data/full/gb_postcodes/LA2-0AN.fix new file mode 100644 index 0000000..89f8b81 --- /dev/null +++ b/t/etc/fixtures/data/full/gb_postcodes/LA2-0AN.fix @@ -0,0 +1,6 @@ +$HASH1 = { + incode => '0AN', + latitude => 53.99747, + longitude => -2.82742, + outcode => 'LA2' + }; diff --git a/t/etc/fixtures/data/full/gb_postcodes/LA2-0AP.fix b/t/etc/fixtures/data/full/gb_postcodes/LA2-0AP.fix new file mode 100644 index 0000000..885d0ba --- /dev/null +++ b/t/etc/fixtures/data/full/gb_postcodes/LA2-0AP.fix @@ -0,0 +1,6 @@ +$HASH1 = { + incode => '0AP', + latitude => 54.0107, + longitude => -2.79779, + outcode => 'LA2' + }; diff --git a/t/etc/fixtures/data/full/gb_postcodes/LA2-0AQ.fix b/t/etc/fixtures/data/full/gb_postcodes/LA2-0AQ.fix new file mode 100644 index 0000000..ae183a6 --- /dev/null +++ b/t/etc/fixtures/data/full/gb_postcodes/LA2-0AQ.fix @@ -0,0 +1,6 @@ +$HASH1 = { + incode => '0AQ', + latitude => 54.02042, + longitude => -2.80675, + outcode => 'LA2' + }; diff --git a/t/etc/fixtures/data/full/gb_postcodes/LA2-0AR.fix b/t/etc/fixtures/data/full/gb_postcodes/LA2-0AR.fix new file mode 100644 index 0000000..383b925 --- /dev/null +++ b/t/etc/fixtures/data/full/gb_postcodes/LA2-0AR.fix @@ -0,0 +1,6 @@ +$HASH1 = { + incode => '0AR', + latitude => 53.99469, + longitude => -2.84932, + outcode => 'LA2' + }; diff --git a/t/etc/fixtures/data/full/leaderboards/1.fix b/t/etc/fixtures/data/full/leaderboards/1.fix new file mode 100644 index 0000000..597a843 --- /dev/null +++ b/t/etc/fixtures/data/full/leaderboards/1.fix @@ -0,0 +1,5 @@ +$HASH1 = { + id => 1, + name => 'Daily Total', + type => 'daily_total' + }; diff --git a/t/etc/fixtures/data/full/leaderboards/2.fix b/t/etc/fixtures/data/full/leaderboards/2.fix new file mode 100644 index 0000000..08fef2c --- /dev/null +++ b/t/etc/fixtures/data/full/leaderboards/2.fix @@ -0,0 +1,5 @@ +$HASH1 = { + id => 2, + name => 'Daily Count', + type => 'daily_count' + }; diff --git a/t/etc/fixtures/data/full/leaderboards/3.fix b/t/etc/fixtures/data/full/leaderboards/3.fix new file mode 100644 index 0000000..4166f18 --- /dev/null +++ b/t/etc/fixtures/data/full/leaderboards/3.fix @@ -0,0 +1,5 @@ +$HASH1 = { + id => 3, + name => 'Weekly Total', + type => 'weekly_total' + }; diff --git a/t/etc/fixtures/data/full/leaderboards/4.fix b/t/etc/fixtures/data/full/leaderboards/4.fix new file mode 100644 index 0000000..feb773c --- /dev/null +++ b/t/etc/fixtures/data/full/leaderboards/4.fix @@ -0,0 +1,5 @@ +$HASH1 = { + id => 4, + name => 'Weekly Count', + type => 'weekly_count' + }; diff --git a/t/etc/fixtures/data/full/leaderboards/5.fix b/t/etc/fixtures/data/full/leaderboards/5.fix new file mode 100644 index 0000000..d0522b2 --- /dev/null +++ b/t/etc/fixtures/data/full/leaderboards/5.fix @@ -0,0 +1,5 @@ +$HASH1 = { + id => 5, + name => 'Monthly Total', + type => 'monthly_total' + }; diff --git a/t/etc/fixtures/data/full/leaderboards/6.fix b/t/etc/fixtures/data/full/leaderboards/6.fix new file mode 100644 index 0000000..f7bb145 --- /dev/null +++ b/t/etc/fixtures/data/full/leaderboards/6.fix @@ -0,0 +1,5 @@ +$HASH1 = { + id => 6, + name => 'Monthly Count', + type => 'monthly_count' + }; diff --git a/t/etc/fixtures/data/full/leaderboards/7.fix b/t/etc/fixtures/data/full/leaderboards/7.fix new file mode 100644 index 0000000..b2aadcd --- /dev/null +++ b/t/etc/fixtures/data/full/leaderboards/7.fix @@ -0,0 +1,5 @@ +$HASH1 = { + id => 7, + name => 'All Time Total', + type => 'all_time_total' + }; diff --git a/t/etc/fixtures/data/full/leaderboards/8.fix b/t/etc/fixtures/data/full/leaderboards/8.fix new file mode 100644 index 0000000..df58698 --- /dev/null +++ b/t/etc/fixtures/data/full/leaderboards/8.fix @@ -0,0 +1,5 @@ +$HASH1 = { + id => 8, + name => 'All Time Count', + type => 'all_time_count' + }; diff --git a/t/etc/fixtures/data/full/organisations/1.fix b/t/etc/fixtures/data/full/organisations/1.fix new file mode 100644 index 0000000..b9ce32d --- /dev/null +++ b/t/etc/fixtures/data/full/organisations/1.fix @@ -0,0 +1,18 @@ +$HASH1 = { + country => undef, + entity_id + => 5, + id => 1, + latitude => 54.04725, + longitude + => -2.79611, + name => 'Test Org', + pending => 0, + postcode => 'LA1 1AF', + sector => undef, + street_name + => 'Test Street', + submitted_by_id + => undef, + town => 'Lancaster' + }; diff --git a/t/etc/fixtures/data/full/organisations/2.fix b/t/etc/fixtures/data/full/organisations/2.fix new file mode 100644 index 0000000..8702817 --- /dev/null +++ b/t/etc/fixtures/data/full/organisations/2.fix @@ -0,0 +1,18 @@ +$HASH1 = { + country => undef, + entity_id + => 6, + id => 2, + latitude => 54.04679, + longitude + => -2.7963, + name => 'Test Org 2', + pending => 0, + postcode => 'LA1 1AG', + sector => undef, + street_name + => 'Test Street', + submitted_by_id + => undef, + town => 'Lancaster' + }; diff --git a/t/etc/fixtures/data/full/users/1.fix b/t/etc/fixtures/data/full/users/1.fix new file mode 100644 index 0000000..25ce8aa --- /dev/null +++ b/t/etc/fixtures/data/full/users/1.fix @@ -0,0 +1,8 @@ +$HASH1 = { + email => 'test1@example.com', + entity_id => 1, + id => 1, + is_admin => 0, + join_date => '2017-09-26 16:46:07', + password => '$2a$08$6CPa/BnjeTVEiYKxIyc2VeDn.5Feer6vSUZ1GnR7mMK.NOLulxeK6' + }; diff --git a/t/etc/fixtures/data/full/users/2.fix b/t/etc/fixtures/data/full/users/2.fix new file mode 100644 index 0000000..4e0d2bf --- /dev/null +++ b/t/etc/fixtures/data/full/users/2.fix @@ -0,0 +1,8 @@ +$HASH1 = { + email => 'test2@example.com', + entity_id => 2, + id => 2, + is_admin => 0, + join_date => '2017-09-26 16:46:07', + password => '$2a$08$vYQVGmZ3JHnRhHG63l/o2Op/iCvzE0C16lNGeuOoMuY5NOvFbKABC' + }; diff --git a/t/etc/fixtures/data/full/users/3.fix b/t/etc/fixtures/data/full/users/3.fix new file mode 100644 index 0000000..8e20071 --- /dev/null +++ b/t/etc/fixtures/data/full/users/3.fix @@ -0,0 +1,8 @@ +$HASH1 = { + email => 'test3@example.com', + entity_id => 3, + id => 3, + is_admin => 0, + join_date => '2017-09-26 16:46:07', + password => '$2a$08$TwGM55wGoR3RiiurPVhIYem4i4dm84ADWK1NHjDELApXSw2n9lloe' + }; diff --git a/t/etc/fixtures/data/full/users/4.fix b/t/etc/fixtures/data/full/users/4.fix new file mode 100644 index 0000000..2349a35 --- /dev/null +++ b/t/etc/fixtures/data/full/users/4.fix @@ -0,0 +1,8 @@ +$HASH1 = { + email => 'test4@example.com', + entity_id => 4, + id => 4, + is_admin => 0, + join_date => '2017-09-26 16:46:07', + password => '$2a$08$2dp0fMs/CWTQglOEOTCSduyXWrknO7XrfUmmUty1Uoy9ljCv6rR8e' + }; diff --git a/t/etc/fixtures/data/full/users/5.fix b/t/etc/fixtures/data/full/users/5.fix new file mode 100644 index 0000000..610abac --- /dev/null +++ b/t/etc/fixtures/data/full/users/5.fix @@ -0,0 +1,8 @@ +$HASH1 = { + email => 'org1@example.com', + entity_id => 5, + id => 5, + is_admin => 0, + join_date => '2017-09-26 16:46:07', + password => '$2a$08$f1OC7odxIXTtPN5EfXFdrO5/7QqzwVbqLpN6UOiV0nPW4tvETQEE2' + }; diff --git a/t/etc/fixtures/data/full/users/6.fix b/t/etc/fixtures/data/full/users/6.fix new file mode 100644 index 0000000..98844fc --- /dev/null +++ b/t/etc/fixtures/data/full/users/6.fix @@ -0,0 +1,8 @@ +$HASH1 = { + email => 'org2@example.com', + entity_id => 6, + id => 6, + is_admin => 0, + join_date => '2017-09-26 16:46:07', + password => '$2a$08$PwazoBpY7oXR5lXgNL4Mv.givt1J6vuclDtxltJKlBHJL1xkOjXMy' + }; diff --git a/t/etc/fixtures/data/full/users/7.fix b/t/etc/fixtures/data/full/users/7.fix new file mode 100644 index 0000000..ab98506 --- /dev/null +++ b/t/etc/fixtures/data/full/users/7.fix @@ -0,0 +1,8 @@ +$HASH1 = { + email => 'admin@example.com', + entity_id => 7, + id => 7, + is_admin => 1, + join_date => '2017-09-26 16:46:07', + password => '$2a$08$PKmst2sVN6N1Qrp9i98GYuWW.mwVrOAktQYCP.ibu7eLDYVP3yja2' + };