Commit 20ac104d8a2654774a475c90f95f09dce1a86e55
1 parent
0f1bc65a
Exists in
master
and in
28 other branches
ActionItem1111: in postgres, when search for blank there was a crash
* Adding .to_i before searching on database
Showing
2 changed files
with
13 additions
and
1 deletions
Show diff stats
app/models/approve_article.rb
test/functional/tasks_controller_test.rb
... | ... | @@ -191,4 +191,16 @@ class TasksControllerTest < Test::Unit::TestCase |
191 | 191 | assert_equal true, PublishedArticle.find(:first).highlighted |
192 | 192 | end |
193 | 193 | |
194 | + should 'create published article after choosing root folder on approve article task' do | |
195 | + PublishedArticle.destroy_all | |
196 | + c = Community.create!(:name => 'test comm', :moderated_articles => false) | |
197 | + @controller.stubs(:profile).returns(c) | |
198 | + c.affiliate(profile, Profile::Roles.all_roles(profile.environment.id)) | |
199 | + article = profile.articles.create!(:name => 'something interesting', :body => 'ruby on rails') | |
200 | + t = ApproveArticle.create!(:name => 'test name', :article => article, :target => c, :requestor => profile) | |
201 | + | |
202 | + post :close, :decision => 'finish', :id => t.id, :task => { :name => 'new_name', :article_parent_id => ""} | |
203 | + assert_not_nil PublishedArticle.find(:first) | |
204 | + end | |
205 | + | |
194 | 206 | end | ... | ... |