Sha256: 8711d7219ce19cdd810a2908f8fc49f12c4fb0f6c6131e98b13f6b23c31a0ee2
Contents?: true
Size: 519 Bytes
Versions: 9
Compression:
Stored size: 519 Bytes
Contents
require 'rails_helper' # This model is in the test suite soley for the purpose of testing ActiveRecord::Enum, # which is available in ActiveRecord4+ only describe PostWithStatus, :type => :model do if defined?(ActiveRecord::Enum) with_versioning do let(:post) { PostWithStatus.create!(:status => 'draft') } it "should stash the enum value properly in versions" do post.published! post.archived! expect(post.previous_version.published?).to be true end end end end
Version data entries
9 entries across 9 versions & 1 rubygems