Bug 11777: add regression test

This patch adds a regression test for ensuring that the
authorisedby field is returned by SearchOrders().

To test:

[1] Upon applying the main patch, verify that
    prove -v t/db_dependent/Acquisition.t passes.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
Galen Charlton 2014-02-19 17:09:34 +00:00
parent ed6e2b57a1
commit a97f21ad3b

View file

@ -8,7 +8,7 @@ use POSIX qw(strftime);
use C4::Bookseller qw( GetBookSellerFromId );
use Test::More tests => 62;
use Test::More tests => 63;
BEGIN {
use_ok('C4::Acquisition');
@ -89,6 +89,7 @@ is(scalar(@$orders), 3, 'retrieved 3 pending orders');
ok( exists( @$orders[0]->{basketgroupid} ), "SearchOrder: The basketgroupid key exists" );
ok( exists( @$orders[0]->{basketgroupname} ), "SearchOrder: The basketgroupname key exists" );
ok( exists( @$orders[0]->{authorisedby} ), "SearchOrders: The authorised key exists (bug 11777)" );
ok( GetBudgetByOrderNumber($ordernumber1)->{'budget_id'} eq $budgetid, "GetBudgetByOrderNumber returns expected budget" );