File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -114,9 +114,36 @@ describe('s3', function() {
114
114
assert . equal ( s3Params . CacheControl , 'max-age=1234, public' ) ;
115
115
assert . equal ( s3Params . Expires , '2010' ) ;
116
116
assert . isUndefined ( s3Params . ContentEncoding ) ;
117
+ assert . isUndefined ( s3Params . ServerSideEncryption ) ;
117
118
} ) ;
118
119
} ) ;
119
120
121
+ it ( 'sets ServerSideEncryption using serverSideEncryption' , function ( ) {
122
+ var s3Params ;
123
+ s3Client . putObject = function ( params , cb ) {
124
+ s3Params = params ;
125
+ cb ( ) ;
126
+ } ;
127
+
128
+ var options = {
129
+ filePaths : [ 'app.css' ] ,
130
+ cwd : process . cwd ( ) + '/tests/fixtures/dist' ,
131
+ prefix : 'js-app' ,
132
+ acl : 'public-read' ,
133
+ bucket : 'some-bucket' ,
134
+ cacheControl : 'max-age=1234, public' ,
135
+ expires : '2010' ,
136
+ serverSideEncryption : 'AES256'
137
+ } ;
138
+
139
+ var promise = subject . upload ( options ) ;
140
+
141
+ return assert . isFulfilled ( promise )
142
+ . then ( function ( ) {
143
+ assert . equal ( s3Params . ServerSideEncryption , 'AES256' , 'ServerSideEncryption passed correctly' ) ;
144
+ } ) ;
145
+ } ) ;
146
+
120
147
it ( 'sends the correct content type params for gzipped files with .gz extension' , function ( ) {
121
148
var s3Params ;
122
149
s3Client . putObject = function ( params , cb ) {
You can’t perform that action at this time.
0 commit comments