Sha256: d63db01fb687c6931341cfa0bee50982df166edfae00baf08e6581ce3631afa0
Contents?: true
Size: 692 Bytes
Versions: 6
Compression:
Stored size: 692 Bytes
Contents
require 'rails_helper' describe Pulitzer::Version do let(:version) { build :version } it 'has a valid factory' do expect(version).to be_valid end describe "Active Model validations" do it { should validate_presence_of(:status) } it { should validate_presence_of(:post_id) } end describe "ActiveRecord associations" do it { should have_many(:content_elements).dependent(:destroy) } it { should have_many(:post_tags).dependent(:destroy) } it { should belong_to(:post) } end describe 'ActiveRecord enums' do it { should define_enum_for(:status). with([:preview, :active, :archived, :abandoned, :processing, :processing_failed]) } end end
Version data entries
6 entries across 6 versions & 1 rubygems