Does not exclude message_html from attributes
This commit is contained in:
parent
3fd8e61271
commit
bcc988a6c6
2 changed files with 7 additions and 1 deletions
|
@ -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
|
||||||
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)
|
||||||
|
|
Loading…
Reference in a new issue