tests fixed
This commit is contained in:
parent
9edf15b95b
commit
7d044addeb
3 changed files with 8 additions and 2 deletions
|
@ -38,12 +38,18 @@ my $session_key = $framework->login({
|
||||||
password => 'abc123',
|
password => 'abc123',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
#TODO be able to define start and end below in request
|
||||||
|
|
||||||
$t->post_ok('/api/stats' => json => {
|
$t->post_ok('/api/stats' => json => {
|
||||||
session_key => $session_key,
|
session_key => $session_key,
|
||||||
})
|
})
|
||||||
->status_is(200)->or($framework->dump_error)
|
->status_is(200)->or($framework->dump_error)
|
||||||
->json_is('/weeks', {
|
->json_is('/weeks', {
|
||||||
purchases => [ 8, 21, 19, 22, 20, 20, 8 ],
|
purchases => [ 8, 21, 19, 22, 20, 20, 8 ],
|
||||||
|
})
|
||||||
|
->json_is('/sectors', {
|
||||||
|
sectors => ['A'],
|
||||||
|
purchases => [118],
|
||||||
});
|
});
|
||||||
|
|
||||||
sub create_random_transaction {
|
sub create_random_transaction {
|
||||||
|
|
|
@ -91,6 +91,7 @@ my $entity5 = {
|
||||||
street_name => 'Test Street',
|
street_name => 'Test Street',
|
||||||
town => 'Lancaster',
|
town => 'Lancaster',
|
||||||
postcode => 'LA1 1AA',
|
postcode => 'LA1 1AA',
|
||||||
|
sector => 'A',
|
||||||
},
|
},
|
||||||
user => {
|
user => {
|
||||||
email => 'org@example.com',
|
email => 'org@example.com',
|
||||||
|
@ -124,4 +125,3 @@ $fixtures->dump({
|
||||||
schema => $schema,
|
schema => $schema,
|
||||||
directory => "$Bin/../data/" . $data_set,
|
directory => "$Bin/../data/" . $data_set,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ $HASH1 = {
|
||||||
pending => 0,
|
pending => 0,
|
||||||
postcode
|
postcode
|
||||||
=> 'LA1 1AA',
|
=> 'LA1 1AA',
|
||||||
sector => undef,
|
sector => 'A',
|
||||||
street_name
|
street_name
|
||||||
=> 'Test Street',
|
=> 'Test Street',
|
||||||
submitted_by_id
|
submitted_by_id
|
||||||
|
|
Reference in a new issue