test/models/adminpanel/image_test.rb in adminpanel-3.5.0 vs test/models/adminpanel/image_test.rb in adminpanel-3.5.1
- old
+ new
@@ -8,11 +8,12 @@
image = Adminpanel::Galleryfile.new(file: uploader)
image.file.store! Rack::Test::UploadedFile.new(Rails.root.join('app/assets/images/hipster.jpg'), 'image/jpg')
assert image.save
- assert_equal image.content_type, 'image/jpg'
- assert_equal image.file_size.to_i, 52196
+
+ assert_equal 'image/jpg', image.file.content_type
+ assert_equal 52196, image.file_size.to_i
end
test "updating a record with galleries should destroy old unassigned images of the same type" do
unassigned_image = adminpanel_images(:unassigned)
assert_not unassigned_image.nil?