spec/aliyun_spec.rb in carrierwave-aliyun-0.4.4 vs spec/aliyun_spec.rb in carrierwave-aliyun-0.5.0
- old
+ new
@@ -56,9 +56,14 @@
url = @connection.private_get_url('bar/foo.jpg')
# http://oss-cn-beijing.aliyuncs.com.//carrierwave-aliyun-test.oss-cn-beijing.aliyuncs.com/bar/foo.jpg?OSSAccessKeyId=1OpWEtPTjIDv5u8q&Expires=1455172009&Signature=4ibgQpfHOjVpqxG6162S8Ar3c6c=
expect(url).to include(*%w(Signature Expires OSSAccessKeyId))
expect(url).to include "http://#{@uploader.aliyun_bucket}.oss-cn-beijing.aliyuncs.com/bar/foo.jpg"
end
+
+ it "should get url with :thumb" do
+ url = @connection.private_get_url('bar/foo.jpg', thumb: '@100w_200h_90q')
+ expect(url).to include "http://#{@uploader.aliyun_bucket}.img-cn-beijing.aliyuncs.com/bar/foo.jpg@100w_200h_90q"
+ end
end
describe 'File' do
it 'should have respond_to identifier' do
f = CarrierWave::Storage::Aliyun::File.new(@uploader, '', '')