Sha256: 1b22faf2f3ad2e85e50385de5e08ec3bdfe2d66f79bf8259e6f2c955cef551a0

Contents?: true

Size: 574 Bytes

Versions: 3

Compression:

Stored size: 574 Bytes

Contents

require 'spec/spec_helper'

#
# Tests for shop order page model extensions
#
describe Shop::Models::Image do
  
  dataset :images, :shop_products
  
  before :each do
    @image = images(:soft_bread_front)
  end
  
  context 'relationships' do
    
    describe 'belongs_to :shop_category' do
      it 'should accept and return a shop_category object' do
        @shop_product = shop_products(:soft_bread)
        
        @image.shop_products << @shop_product
        
        @image.shop_products.include?(@shop_product).should === true
      end
    end
    
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
radiant-shop-extension-0.10.0 spec/lib/shop/models/image_spec.rb
radiant-shop-extension-0.9.3 spec/lib/shop/models/image_spec.rb
radiant-shop-extension-0.9.2 spec/lib/shop/models/image_spec.rb