Fix org graphs test for entity upgrade
This commit is contained in:
parent
adfcd8880f
commit
cca27b5475
2 changed files with 5 additions and 3 deletions
|
@ -56,7 +56,7 @@ sub graph_customers_last_30_days {
|
|||
sub _customers_last_duration {
|
||||
my ( $c, $duration ) = @_;
|
||||
|
||||
my $org = $c->stash->{api_user}->organisation;
|
||||
my $org = $c->stash->{api_user}->entity;
|
||||
|
||||
my $data = { day => [], count => [] };
|
||||
|
||||
|
|
|
@ -77,9 +77,11 @@ sub create_random_transaction {
|
|||
my $buyer = shift;
|
||||
my $time = shift;
|
||||
|
||||
my $buyer_result = $schema->resultset('User')->find({ email => $buyer })->entity;
|
||||
my $seller_result = $schema->resultset('Organisation')->find({ name => 'Test Org' })->entity;
|
||||
$schema->resultset('Transaction')->create({
|
||||
buyer => { email => $buyer },
|
||||
seller => { name => 'Test Org' },
|
||||
buyer => $buyer_result,
|
||||
seller => $seller_result,
|
||||
value => ( int( rand( 10000 ) ) / 100 ),
|
||||
proof_image => 'a',
|
||||
purchase_time => $time,
|
||||
|
|
Reference in a new issue