Does not exclude message_html from attributes

parent 3fd8e612
...@@ -4,7 +4,7 @@ class BroadcastMessage < ActiveRecord::Base ...@@ -4,7 +4,7 @@ class BroadcastMessage < ActiveRecord::Base
include CacheMarkdownField include CacheMarkdownField
include Sortable include Sortable
cache_markdown_field :message, pipeline: :broadcast_message cache_markdown_field :message, pipeline: :broadcast_message, hidden: false
validates :message, presence: true validates :message, presence: true
validates :starts_at, presence: true validates :starts_at, presence: true
......
...@@ -95,6 +95,12 @@ describe BroadcastMessage do ...@@ -95,6 +95,12 @@ describe BroadcastMessage do
end end
end end
describe '#attributes' do
it 'includes message_html field' do
expect(subject.attributes.keys).to include("cached_markdown_version", "message_html")
end
end
describe '#active?' do describe '#active?' do
it 'is truthy when started and not ended' do it 'is truthy when started and not ended' do
message = build(:broadcast_message) message = build(:broadcast_message)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment