Sha256: 56eb503aa2968a3988f00dd716f92273f764cd3fd56d220fc83c8315a822ed26

Contents?: true

Size: 862 Bytes

Versions: 30

Compression:

Stored size: 862 Bytes

Contents

require File.dirname(__FILE__) + "/../../../spec_helper"

#
# Tests for Page extensions
#
describe Shop::Models::Page do
  
  dataset :pages, :shop_categories, :shop_products
  
  before :each do
    @page = pages(:home)
  end
  
  context 'relationships' do
    
    describe 'belongs_to :shop_category' do
      it 'should accept and return a shop_category object' do
        @shop_category = shop_categories(:bread)
        
        @page.shop_category = @shop_category
        
        @page.shop_category.should === @shop_category
      end
    end
    
    describe 'belongs_to :shop_product' do
      it 'should accept and return a shop_product object' do
        @shop_product = shop_products(:warm_bread)
        
        @page.shop_product = @shop_product
        
        @page.shop_product.should === @shop_product
      end
    end
    
  end
  
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
radiant-shop-extension-0.94.8 spec/lib/shop/models/page_spec.rb
radiant-shop-extension-0.94.7 spec/lib/shop/models/page_spec.rb
radiant-shop-extension-0.94.6 spec/lib/shop/models/page_spec.rb
radiant-shop-extension-0.94.5 spec/lib/shop/models/page_spec.rb
radiant-shop-extension-0.94.4 spec/lib/shop/models/page_spec.rb
radiant-shop-extension-0.94.3 spec/lib/shop/models/page_spec.rb
radiant-shop-extension-0.94.2 spec/lib/shop/models/page_spec.rb
radiant-shop-extension-0.94.1 spec/lib/shop/models/page_spec.rb
radiant-shop-extension-0.94.0 spec/lib/shop/models/page_spec.rb
radiant-shop-extension-0.93.3 spec/lib/shop/models/page_spec.rb
radiant-shop-extension-0.93.2 spec/lib/shop/models/page_spec.rb
radiant-shop-extension-0.93.1 spec/lib/shop/models/page_spec.rb
radiant-shop-extension-0.93.0 spec/lib/shop/models/page_spec.rb
radiant-shop-extension-0.92.11 spec/lib/shop/models/page_spec.rb
radiant-shop-extension-0.92.10 spec/lib/shop/models/page_spec.rb
radiant-shop-extension-0.92.9 spec/lib/shop/models/page_spec.rb
radiant-shop-extension-0.92.8 spec/lib/shop/models/page_spec.rb
radiant-shop-extension-0.92.7 spec/lib/shop/models/page_spec.rb
radiant-shop-extension-0.92.6 spec/lib/shop/models/page_spec.rb
radiant-shop-extension-0.92.3 spec/lib/shop/models/page_spec.rb