Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
bcc988a6
Commit
bcc988a6
authored
Mar 20, 2019
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Does not exclude message_html from attributes
parent
3fd8e612
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
app/models/broadcast_message.rb
app/models/broadcast_message.rb
+1
-1
spec/models/broadcast_message_spec.rb
spec/models/broadcast_message_spec.rb
+6
-0
No files found.
app/models/broadcast_message.rb
View file @
bcc988a6
...
...
@@ -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
...
...
spec/models/broadcast_message_spec.rb
View file @
bcc988a6
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment