[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3415] trunk
- Subject: SF.net SVN: ledger-smb:[3415] trunk
- From: ..hidden..
- Date: Sun, 03 Jul 2011 02:52:23 +0000
Revision: 3415
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3415&view=rev
Author: einhverfr
Date: 2011-07-03 02:52:23 +0000 (Sun, 03 Jul 2011)
Log Message:
-----------
Added default ordering to business_type__list, added doc strings to Business_type.sql
Modified Paths:
--------------
trunk/sql/modules/Business_type.sql
trunk/t/40-dbsetup.t
Modified: trunk/sql/modules/Business_type.sql
===================================================================
--- trunk/sql/modules/Business_type.sql 2011-07-02 15:02:41 UTC (rev 3414)
+++ trunk/sql/modules/Business_type.sql 2011-07-03 02:52:23 UTC (rev 3415)
@@ -2,8 +2,11 @@
$$
DECLARE out_row business%ROWTYPE;
BEGIN
- FOR out_row IN SELECT * FROM business LOOP
+ FOR out_row IN SELECT * FROM business ORDER BY description LOOP
RETURN NEXT out_row;
END LOOP;
END;
$$ LANGUAGE PLPGSQL;
+
+COMMENT ON function business_type__list() IS
+$$Returns a list of all business types. Ordered by description by default.$$;
Modified: trunk/t/40-dbsetup.t
===================================================================
--- trunk/t/40-dbsetup.t 2011-07-02 15:02:41 UTC (rev 3414)
+++ trunk/t/40-dbsetup.t 2011-07-03 02:52:23 UTC (rev 3415)
@@ -63,7 +63,7 @@
or !defined $ENV{LSMB_ADMIN_LNAME});
# Move to LedgerSMB::DBObject::Admin calls.
my $lsmb = new LedgerSMB;
- ok(defined $lsmb);
+ ok(defined $lsmb, '$lsmb defined');
isa_ok($lsmb, 'LedgerSMB');
$lsmb->{dbh} = DBI->connect("dbi:Pg:dbname=$ENV{PGDATABASE}",
undef, undef, { AutoCommit => 0 });
@@ -80,7 +80,7 @@
country_id => $id,
});
my $user = LedgerSMB::DBObject::Admin->new({base => $lsmb});
- ok($user->save_user);
+ ok($user->save_user, 'User saved');
$sth = $dbh->prepare("SELECT admin__add_user_to_role(?, ?)");
my $rolename = "lsmb_" . $ENV{PGDATABASE} . "__users_manage";
ok($sth->execute($ENV{LSMB_ADMIN_USERNAME}, $rolename),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.