# Copyright (c) 2005 bivio Software, Inc. All Rights Reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: ForumEditDAVList.bunit,v 1.6 2009/12/26 22:58:43 nagler Exp $ Request('initialize_fully'); req()->set_realm_and_user(undef, 'demo'); my($load_list) = sub { my($realm) = @_; req()->set_realm($realm); return model('ForumList', {})->get_result_set_size; }; my($base) = $load_list->(); my($forum_count) = sub { my($realm, $count) = @_; return sub {$load_list->($realm)} => ($count + ($realm ? 0 : $base)); }; [ [req()] => [ $forum_count->(undef, 0), dav_put => [ [\(my $x = <<'EOF')] => not_die(), ignore fedl1,ForumEditDAVList1 EOF ], $forum_count->(undef, 1), dav_put => [ sub {[\(my $x = <<"EOF")]} => not_die(), ignore fedl1,ForumEditDAVList1 now,@{[realm_id('fedl1')]} fedl2,My OTher forum EOF ], $forum_count->(undef, 2), ], ];