1#!perl -T 2 3use Test::More tests => 1; 4#use Test::More 'no_plan'; 5 6use lib 't'; 7use TestConfig; 8login_myspace or die "Login Failed - can't run tests"; 9 10my $myspace = $CONFIG->{acct1}->{myspace}; # For sanity 11 12my $ident = "wmyw" . int(rand(100000)) . "wmyw"; 13 14SKIP: { 15 skip "Not logged in", 1 unless $CONFIG->{login}; 16 17 my $testing=1; $testing = 0 if ( $CONFIG->{fulltest} ); 18 19 my $result = $myspace->post_blog( 20 subject => "Testing $ident", 21 message => "Hi there, sorry if you're reading this. $ident", 22 testing => $testing, # Skips confirmation so blog doesn't post. 23 ); 24 25 if ( $myspace->error ) { 26 warn $myspace->error . "\n"; 27 warn "\n\n".$myspace->current_page->content; 28 } 29 30 ok( $result, "post_blog returns positive success code" ); 31}