журнал (shhh) wrote in changelog,
журнал
shhh
changelog

[livejournal] r23256: LJSUP-14164: Unit tests infrastructure

Committer: nnikulochkina
LJSUP-14164: Unit tests infrastructure
U   trunk/cgi-bin/LJ/Test.pm
Modified: trunk/cgi-bin/LJ/Test.pm
===================================================================
--- trunk/cgi-bin/LJ/Test.pm	2012-11-06 08:00:05 UTC (rev 23255)
+++ trunk/cgi-bin/LJ/Test.pm	2012-11-06 08:35:47 UTC (rev 23256)
@@ -477,6 +477,7 @@
 
     # pass-thru opts
     $req{usejournal} = $opts{usejournal} if $opts{usejournal};
+
     $flags->{usejournal_okay} = $opts{usejournal_okay} if $opts{usejournal_okay};
 
     LJ::do_request(\%req, \%res, $flags);
@@ -484,7 +485,9 @@
     die "Error posting: $res{errmsg}" unless $res{'success'} eq "OK";
     my $jitemid = $res{itemid} or die "No itemid";
 
-    return LJ::Entry->new($u, jitemid => $jitemid);
+    my $uowner = $opts{usejournal} ? LJ::load_user($opts{usejournal}) : $u;
+
+    return LJ::Entry->new($uowner, jitemid => $jitemid);
 }
 
 package LJ::Entry;

Tags: livejournal, nikulochkina, nnikulochkina, pm
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments