Metabase-Fact

 view release on metacpan or  search on metacpan

t/user/profile.t  view on Meta::CPAN

END { chdir $cwd }
my $output_file = 'my.profile.json';
my $X = $^X =~ m/\s/ ? qq{"$^X"} : $^X;
$bin = $bin =~ m/\s/ ? qq{"$bin"} : $bin;
qx/$X $bin -o $output_file --name "JohnPublic" --email jp\@example.com --secret 3.14159/;
ok( -r $output_file, 'created named profile file with metabase-profile' );

qx/$X $bin --name "JohnPublic" --email jp\@example.com --secret 3.14159/;
ok( -r 'metabase_id.json', 'created default profile file with metabase-profile' );

my $file_guts = do { local ( @ARGV, $/ ) = 'metabase_id.json'; <> };
my $facts         = $json->decode($file_guts);
my $profile_copy2 = Metabase::User::Profile->from_struct( $facts->[0] );
ok( $profile_copy2, "Loaded profile from file" );
my $secret_copy2 = Metabase::User::Secret->from_struct( $facts->[1] );
ok( $secret_copy2, "Loaded secret from file" );

done_testing;

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.509 second using v1.00-cache-2.02-grep-82fe00e-cpan-c9a218a2bbc )