[dw-free] fix t/assertions.t
[commit: http://hg.dwscoalition.org/dw-free/rev/eff31b30c83c]
http://bugs.dwscoalition.org/show_bug.cgi?id=2485
Fix assertion test.
Patch by
kareila.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2485
Fix assertion test.
Patch by
Files modified:
- t/assertions.t
--------------------------------------------------------------------------------
diff -r f359f9ff8358 -r eff31b30c83c t/assertions.t
--- a/t/assertions.t Tue Apr 20 09:29:50 2010 +0000
+++ b/t/assertions.t Tue Apr 20 09:31:34 2010 +0000
@@ -5,8 +5,7 @@ use lib "$ENV{LJHOME}/cgi-bin";
use lib "$ENV{LJHOME}/cgi-bin";
require 'ljlib.pl';
-#plan tests => ;
-plan skip_all => 'fix this test!';
+plan tests => 13;
ok(LJ::assert_is("foo", "foo"));
ok(! eval { LJ::assert_is("foo", "bar") });
@@ -51,6 +50,6 @@ LJ::load_userids_multiple([ $u->{userid}
LJ::load_userids_multiple([ $u->{userid} => \$empty ]);
ok($empty == $u, "load multiple worked");
-my $bogus = { userid => $u->{userid} + 1 };
+my $bogus = bless { userid => $u->{userid} + 1 }, 'LJ::User';
ok(! eval { LJ::load_userids_multiple([ $u->{userid} => \$bogus ]) });
like($@, qr/AssertIs/, "failed on blowing away existing user record");
--------------------------------------------------------------------------------
