Skip to content
Snippets Groups Projects
Unverified Commit bcc988a6 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
Browse files

Does not exclude message_html from attributes

parent 3fd8e612
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -4,7 +4,7 @@ class BroadcastMessage < ActiveRecord::Base
include CacheMarkdownField
include Sortable
 
cache_markdown_field :message, pipeline: :broadcast_message
cache_markdown_field :message, pipeline: :broadcast_message, hidden: false
 
validates :message, presence: true
validates :starts_at, presence: true
Loading
Loading
Loading
Loading
@@ -95,6 +95,12 @@ describe BroadcastMessage do
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
it 'is truthy when started and not ended' do
message = build(:broadcast_message)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment