Don't delete old users
[scpubgit/stemmaweb.git] / t / 07google.t
index 46e6a20..37f0a66 100644 (file)
@@ -13,6 +13,7 @@ use Test::WWW::Mechanize;
 use Test::More;
 use HTML::TreeBuilder;
 use Data::Dumper;
+use IO::All;
 
 use stemmaweb::Test::DB;
 
@@ -26,6 +27,8 @@ LWP::Protocol::PSGI->register(stemmaweb->psgi_app);
 
 my $ua = Test::WWW::Mechanize->new;
 
+io("$FindBin::Bin/var")->rmtree if io("$FindBin::Bin/var")->exists;
+
 {
     my $scope = $dir->new_scope;
 
@@ -85,7 +88,7 @@ my $ua = Test::WWW::Mechanize->new;
 {
     my $scope = $dir->new_scope;
 
-    ok !$dir->find_user({ url => 'https://www.google.com/accounts/o8/id' }), 'Old google-openid is gone.';
+    # ok !$dir->find_user({ url => 'https://www.google.com/accounts/o8/id' }), 'Old google-openid is gone.';
 
     ok $dir->find_user({ sub => 42, openid_id => 'https://www.google.com/accounts/o8/id' }), 'The G+ user is there.';
 
@@ -196,7 +199,7 @@ my $ua = Test::WWW::Mechanize->new;
 
     $ua->get('/');
 
-    $ua->content_contains('Hello! 4242!', 'We are logged in.');
+    $ua->content_contains('Hello! email@example.org!', 'We are logged in.');
 
     ok $dir->find_user({ sub => 4242, openid_id => 'https://www.google.com/accounts/o8/id3' }), 'The G+ user is there.';
 
@@ -216,7 +219,9 @@ my $ua = Test::WWW::Mechanize->new;
 
     $ua->get('/');
 
-    $ua->content_contains('Hello! 4242!', 'We are logged in.');
+    $ua->content_contains('Hello! email@example.org!', 'We ar logged in.');
 }
 
+io("$FindBin::Bin/var")->rmtree if io("$FindBin::Bin/var")->exists;
+
 done_testing;