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

Version Path
forge-cli-0.1.10 lib/forge/spec/models/product_image_spec.rb
forge-cli-0.1.9 lib/forge/spec/models/product_image_spec.rb
forge-cli-0.1.8 lib/forge/spec/models/product_image_spec.rb
forge-cli-0.1.7 lib/forge/spec/models/product_image_spec.rb
forge-cli-0.1.6 lib/forge/spec/models/product_image_spec.rb
forge-cli-0.1.5 lib/forge/spec/models/product_image_spec.rb
forge-cli-0.1.4 lib/forge/spec/models/product_image_spec.rb
forge-cli-0.1.3 lib/forge/spec/models/product_image_spec.rb
forge-cli-0.1.2 lib/forge/spec/models/product_image_spec.rb
forge-cli-0.1.1 lib/forge/spec/models/product_image_spec.rb
forge-cli-0.1.0 lib/forge/spec/models/product_image_spec.rb
forge-cli-0.0.18 lib/forge/spec/models/product_image_spec.rb
forge-cli-0.0.17 lib/forge/spec/models/product_image_spec.rb
forge-cli-0.0.16 lib/forge/spec/models/product_image_spec.rb
forge-cli-0.0.15 lib/forge/spec/models/product_image_spec.rb
forge-cli-0.0.14 lib/forge/spec/models/product_image_spec.rb
forge-cli-0.0.13 lib/forge/spec/models/product_image_spec.rb
forge-cli-0.0.12 lib/forge/spec/models/product_image_spec.rb
forge-cli-0.0.11 lib/forge/spec/models/product_image_spec.rb
forge-cli-0.0.10 lib/forge/spec/models/product_image_spec.rb