From: Eden Cardim Date: Thu, 12 Jul 2012 21:33:54 +0000 (-0300) Subject: fixing attribute rename X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d5033c7aa090d66ca7ac82bd81fb2be11a3c80c6;p=scpubgit%2Fstemmatology.git fixing attribute rename --- diff --git a/t/text_tradition_user.t b/t/text_tradition_user.t index bf36587..b9810b7 100644 --- a/t/text_tradition_user.t +++ b/t/text_tradition_user.t @@ -27,7 +27,7 @@ my $new_user = $user_store->add_user({ username => 'fred', password => 'bloggspass'}); isa_ok($new_user, 'Text::Tradition::User'); is($new_user->active, 1, 'New user created and active'); -is($new_user->display, 'fred', 'Display value set to username'); +is($new_user->email, 'fred', 'Email value set to username'); ok(!$new_user->is_admin, 'New user is not an admin'); ## find user @@ -214,25 +214,25 @@ TODO: { my $openid_user = $user_store->create_user({ url => 'http://username.myopenid.com', - display => 'username.myopenid.com', + email => 'username.myopenid.com', }); ok($openid_user, 'Created user from OpenID params'); my $get_openid_user = $user_store->find_user({ url => 'http://username.myopenid.com', - display => 'username.myopenid.com', + email => 'username.myopenid.com', }); ok($openid_user == $get_openid_user, 'Found OpenID user again'); is($get_openid_user->id, 'http://username.myopenid.com', 'Set id to unique url from openid'); - is($get_openid_user->display, 'username.myopenid.com', 'Kept original display value'); + is($get_openid_user->email, 'username.myopenid.com', 'Kept original email value'); } { ## Add/find openid user with email attribute: my $openid_user = $user_store->create_user({ url => 'http://blahblah.com/foo/bar/baz/lotsofjunk', - display => 'http://blahblah.com/foo/bar/baz/lotsofjunk', + email => 'http://blahblah.com/foo/bar/baz/lotsofjunk', extensions => { 'http://openid.net/srv/ax/1.0' => { 'value.email' => 'fredbloggs@blahblah.com', @@ -245,7 +245,7 @@ TODO: { my $get_openid_user = $user_store->find_user({ url => 'http://blahblah.com/foo/bar/baz/lotsofjunk', - display => 'http://blahblah.com/foo/bar/baz/lotsofjunk', + email => 'http://blahblah.com/foo/bar/baz/lotsofjunk', extensions => { 'http://openid.net/srv/ax/1.0' => { 'value.email' => 'fredbloggs@blahblah.com', @@ -257,5 +257,5 @@ TODO: { ok($openid_user == $get_openid_user, 'Found OpenID user again'); is($get_openid_user->id, 'http://blahblah.com/foo/bar/baz/lotsofjunk', 'Set id to unique url from openid'); - is($get_openid_user->display, 'fredbloggs@blahblah.com', 'Set display value to email from extension'); + is($get_openid_user->email, 'fredbloggs@blahblah.com', 'Set email value to email from extension'); }