Ignore:
Timestamp:
Mar 5, 2006, 11:53:09 AM (16 years ago)
Author:
Ivor Williams
Message:

Closes #87 Editing a mirrored page now edits on source site

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/t/51_display_node.t

    r594 r739  
    33use OpenGuides::Config;
    44use OpenGuides;
    5 use Test::More tests => 5;
     5use Test::More tests => 7;
    66
    77eval { require DBD::SQLite; };
     
    3232    my $wiki = $guide->wiki;
    3333    isa_ok( $wiki, "CGI::Wiki" );
    34     $wiki->write_node( "Test Page", "foo" );
     34    $wiki->write_node( "Test Page", "foo", undef, { source => "alternate.cgi?Test_Page" } );
    3535    my $output = eval {
    3636        $guide->display_node( id => "Test Page", return_output => 1 );
     
    3838    is( $@, "", "->display_node doesn't die" );
    3939
     40    like( $output, qr{\<a.*?\Qhref="alternate.cgi?id=Test_Page;action=edit">Edit this page</a>\E}, "...and edit link is redirected to source URL" );
    4041    $config->home_name( "My Home Page" );
    4142    $output = $guide->display_node( return_output => 1 );
    4243    like( $output, qr/My Home Page/, "...and defaults to the home node, and takes notice of what we want to call it" );
     44    like( $output, qr{\Q<a href="wiki.cgi?action=edit;id=My_Home_Page">Edit this page</a>\E}, "...and home page has an edit link" );
    4345    my %tt_vars = $guide->display_node( return_tt_vars => 1 );
    4446    ok( defined $tt_vars{recent_changes}, "...and recent_changes is set for the home node even if we have changed its name" );
Note: See TracChangeset for help on using the changeset viewer.