Commit baa05c228415deb0890edd715e714f14fab131c3
1 parent
961101be
Exists in
master
and in
29 other branches
Suggested articles are not highlighted by default
(ActionItem1858)
Showing
2 changed files
with
9 additions
and
1 deletions
Show diff stats
app/models/suggest_article.rb
... | ... | @@ -15,7 +15,7 @@ class SuggestArticle < Task |
15 | 15 | settings_items :article_parent_id, :type => String |
16 | 16 | settings_items :source, :type => String |
17 | 17 | settings_items :source_name, :type => String |
18 | - settings_items :highlighted, :type => :boolean | |
18 | + settings_items :highlighted, :type => :boolean, :default => false | |
19 | 19 | |
20 | 20 | def sender |
21 | 21 | "#{name} (#{email})" | ... | ... |
test/unit/suggest_article_test.rb
... | ... | @@ -113,6 +113,14 @@ class SuggestArticleTest < ActiveSupport::TestCase |
113 | 113 | assert article.highlighted |
114 | 114 | end |
115 | 115 | |
116 | + should 'not be highlighted by default' do | |
117 | + t = build(SuggestArticle, :target => @profile) | |
118 | + t.perform | |
119 | + | |
120 | + article = TinyMceArticle.last(:conditions => { :name => t.article_name}) | |
121 | + assert_equal false, article.highlighted | |
122 | + end | |
123 | + | |
116 | 124 | should 'override target notification message method from Task' do |
117 | 125 | task = build(SuggestArticle, :target => @profile) |
118 | 126 | assert_nothing_raised NotImplementedError do | ... | ... |