Sha256: 0a166dff2f275a6c4c20c9cc59ffe334b75b13fbcdfabf8c9ba2023df4ac2f3a
Contents?: true
Size: 888 Bytes
Versions: 22
Compression:
Stored size: 888 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 it 'should be uniqueness with Page' do _template = Template.create name: 'Page', code_name: 'get_field_value' _template.valid?.should be_false 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 = _brand.id _brand.child.should == _brand end end end end
Version data entries
22 entries across 22 versions & 3 rubygems