Sha256: c71b7c6ffb099b1d7be8052d77c9fe4cd55c7c64108f33f6241f908fd31d9d5e
Contents?: true
Size: 712 Bytes
Versions: 6
Compression:
Stored size: 712 Bytes
Contents
# encoding: utf-8 require 'spec_helper' module ConstructorPages describe Template do before :each do Template.delete_all end it 'should be valid' do _template = Template.create name: 'Page template', code_name: 'page_template' _template.valid?.should be_true end describe '#child' do it 'should return child corresponding child_id or children first' do _brand = Template.create name: 'Brand', code_name: 'brand' _series = Template.create name: 'Series', code_name: 'series', parent: _brand _brand.reload _brand.child.should == _series _brand.child_id = 1 _brand.child.should == _brand end end end end
Version data entries
6 entries across 6 versions & 2 rubygems