Skip to content

Commit

Permalink
Add test that token owner ignored. Fixes #825
Browse files Browse the repository at this point in the history
  • Loading branch information
pauamma committed Sep 10, 2014
1 parent e8ca161 commit a949e23
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion t/rename.t
Expand Up @@ -15,7 +15,7 @@
use strict;
use warnings;

use Test::More tests => 152;
use Test::More tests => 153;

use lib "$ENV{LJHOME}/cgi-bin";
BEGIN { require 'ljlib.pl'; }
Expand Down Expand Up @@ -489,6 +489,17 @@ note( "-- openid and feeds" );
ok( ! $u->can_rename_to( $u->user . "_rename" ), "Cannot rename feed accounts" );
}

note( "-- rename token ownership ignored" );
{
my $u = temp_user();

my $fromusername = $u->user;
my $tousername = $fromusername . "_renameto";

ok( $u->rename( $tousername, token => new_token( temp_user() ) ),
"Check that rename token ownership is ignored" );
}

note( "-- two username swap (personal to personal)" );
{
my ( $u1, $u2 ) = $create_users->( match => 1, validated => 1 );
Expand Down

0 comments on commit a949e23

Please sign in to comment.