Commit 94cbc1ba by lanrion

added fake date

parent b23ec14b
...@@ -29,6 +29,7 @@ module WeixinAuthorize ...@@ -29,6 +29,7 @@ module WeixinAuthorize
base = WeixinUploader.new base = WeixinUploader.new
base.download!(media.to_s) base.download!(media.to_s)
base.file.to_file base.file.to_file
# CarrierWave.clean_cached_files!
else else
media.is_a?(File) ? media : File.new(media) media.is_a?(File) ? media : File.new(media)
end end
......
...@@ -11,8 +11,8 @@ describe WeixinAuthorize::Api::Media do ...@@ -11,8 +11,8 @@ describe WeixinAuthorize::Api::Media do
end end
let(:remote_image_path) do let(:remote_image_path) do
# "http://l.ruby-china.org/user/large_avatar/273.png" "http://l.ruby-china.org/user/large_avatar/273.png"
"http://g.hiphotos.baidu.com/baike/c0%3Dbaike80%2C5%2C5%2C80%2C26/sign=ce55457e4334970a537e187df4a3baad/03087bf40ad162d99455ef4d13dfa9ec8b13632762d0ed14.jpg" # "http://g.hiphotos.baidu.com/baike/c0%3Dbaike80%2C5%2C5%2C80%2C26/sign=ce55457e4334970a537e187df4a3baad/03087bf40ad162d99455ef4d13dfa9ec8b13632762d0ed14.jpg"
end end
it "can upload a image" do it "can upload a image" do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment