File: api-construct.t

package info (click to toggle)
libnet-amazon-s3-perl 0.991-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,620 kB
  • sloc: perl: 9,906; makefile: 20
file content (39 lines) | stat: -rw-r--r-- 758 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!perl

use strict;
use warnings;

use FindBin;
use lib $FindBin::Bin;

BEGIN { require 'test-helper-common.pl' }

use Net::Amazon::S3;

it "can construct API instance with list arguments",
	got => Net::Amazon::S3->new (
		aws_access_key_id => 'foo',
		aws_secret_access_key => 'bar',
	),
	expect => all (
		obj_isa ('Net::Amazon::S3'),
		methods (aws_access_key_id => 'foo'),
		methods (aws_secret_access_key => 'bar'),
	),
	;

it "can construct API instance with hashref arguments",
	got => Net::Amazon::S3->new ({
		aws_access_key_id => 'foo',
		aws_secret_access_key => 'bar',
	}),
	expect => all (
		obj_isa ('Net::Amazon::S3'),
		methods (aws_access_key_id => 'foo'),
		methods (aws_secret_access_key => 'bar'),
	),
	;

had_no_warnings;

done_testing;