Fix test, don't hardcode value.

        Patch by kareila. 

diffs (37 lines):

diff -r 08e9451d3370 -r b097a4f441a9 t/feed-atom.t
--- a/t/feed-atom.t     Tue Mar 01 09:25:31 2011 -0600
+++ b/t/feed-atom.t     Thu Mar 03 14:09:21 2011 +0800
@@ -14,6 +14,7 @@ my $remote = $u;
 my $remote = $u;
 my $r = DW::Request::Standard->new(
             HTTP::Request->new( GET => $u->journal_base . "/data/atom" ) );
+my $site_ns = lc $LJ::SITENAMEABBREV;
 
 
 note( "Empty feed" );
@@ -38,8 +39,8 @@ my $e2 = $u->t_post_fake_entry;
     delete $parsed->{Kids};
     is_deeply( $parsed,
         {
-            'xmlns'     => "http://www.w3.org/2005/Atom";,
-            'xmlns:dw'  => $LJ::SITEROOT
+            'xmlns'          => "http://www.w3.org/2005/Atom";,
+            "xmlns:$site_ns" => $LJ::SITEROOT,
         }, "Check namespaces for feed" );
 
     my ( $feed, $error ) = LJ::ParseFeed::parse_feed( $feed_xml, "atom" );
@@ -121,10 +122,10 @@ note( "No bot crawling" );
     delete $parsed->{Kids};
     is_deeply( $parsed,
         {
-            'xmlns'     => "http://www.w3.org/2005/Atom";,
-            'xmlns:dw'  => $LJ::SITEROOT,
-            'xmlns:idx' => 'urn:atom-extension:indexing',
-            'idx:index' => 'no',
+            'xmlns'          => "http://www.w3.org/2005/Atom";,
+            "xmlns:$site_ns" => $LJ::SITEROOT,
+            'xmlns:idx'      => 'urn:atom-extension:indexing',
+            'idx:index'      => 'no',
         }, "Atom indexing extension" );
 
     my ( $feed, $error ) = LJ::ParseFeed::parse_feed( $feed_xml, "atom" );
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to