Sha256: 84253737d2875760c0e3cf4b3cd0a5dfe10263bf0e8f27e3ff63d73398facc97
Contents?: true
Size: 593 Bytes
Versions: 24
Compression:
Stored size: 593 Bytes
Contents
require 'spec_helper' describe ProductImage do fixtures :assets, :product_images before do @png_asset, @txt_asset = assets(:png), assets(:txt) @png_asset.attachment = File.new(File.join(Rails.root, 'spec/fixtures/sample_file.png')) and @png_asset.save @txt_asset.attachment = File.new(File.join(Rails.root, 'spec/fixtures/sample_file.txt')) and @txt_asset.save @product_image = product_images(:first) end it "should save properly when assigned an image asset" do @product_image.image_asset_id = @png_asset.id @product_image.save.should_not == nil end end
Version data entries
24 entries across 24 versions & 1 rubygems