AWS-CLI-Config

 view release on metacpan or  search on metacpan

t/03_output.t  view on Meta::CPAN

use strict;
use warnings;
use Test::More;

use AWS::CLI::Config;

subtest 'From credentials file' => sub {
    my $output = '__format__';
    no strict 'refs';
    no warnings 'redefine';
    *AWS::CLI::Config::credentials = sub {
        return AWS::CLI::Config::Profile->new({
                output => $output,
            });
    };
    is(AWS::CLI::Config::output, $output, 'set by credentials');
};

subtest 'From config file' => sub {
    my $output = '__format__';
    no strict 'refs';
    no warnings 'redefine';
    *AWS::CLI::Config::credentials = sub {
        return undef;
    };
    *AWS::CLI::Config::config = sub {
        return AWS::CLI::Config::Profile->new({
                output => $output,
            });
    };
    is(AWS::CLI::Config::output, $output, 'set by config');
};

done_testing;

__END__
# vi: set ts=4 sw=4 sts=0 et ft=perl fenc=utf-8 ff=unix :



( run in 2.672 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )