Sha256: b500f3bc3a5d397cc6458488c6ca63c284d1b3952b3d8c62cae128eb41d7c42d
Contents?: true
Size: 719 Bytes
Versions: 16
Compression:
Stored size: 719 Bytes
Contents
require 'rails_helper' describe Pulitzer::PostType do let(:post_type) { build :post_type } it 'has a valid factory' do expect(post_type).to be_valid end describe "Active Model validations" do it { should validate_presence_of(:name) } it { should validate_presence_of(:kind) } end describe "ActiveRecord associations" do it { should have_many(:posts).dependent(:destroy) } it { should have_many(:post_type_content_element_types).dependent(:destroy) } it { should have_many(:content_element_types).through(:post_type_content_element_types) } end describe 'ActiveRecord enums' do it { should define_enum_for(:kind). with([:template, :free_form, :hybrid]) } end end
Version data entries
16 entries across 16 versions & 1 rubygems