ActiveStorage文件URL-RSpec失败

时间:2019-04-24 07:18:17

标签: ruby-on-rails-5 rails-activestorage

i我对rspec中的文件的URL有疑问。为什么此文件在rspec中具有不同的“哈希”? -"picture" => {"id"=>19, "file_url"=>"http://localhost:3000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBHUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--8d5296367933e81f9cbaae31c56598b039a876af/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lPTVRreU1IZ3hPVEl3QmpvR1JWUT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--1da0462c34d6f05628a886d4f9ea79e979538c89/milk.jpg", "file_name"=>"milk"}

+"picture" => {"id"=>19, "file_url"=>"http://localhost:3000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBHUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--8d5296367933e81f9cbaae31c56598b039a876af/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lQTVRreU1IZ3hPVEl3UGdZNkJrVlUiLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--69b38afae34a3a976665a013b348de3386f1b127/milk.jpg"

在==-

之后有一些“哈希”

1da0462c34d6f05628a886d4f9ea79e979538c89 / milk.jpg

VS

69b38afae34a3a976665a013b348de3386f1b127 / milk.jpg

为什么?该如何解决?

0 个答案:

没有答案