diff --git a/app/models/article.rb b/app/models/article.rb index 4cb47a4..f8fb795 100644 --- a/app/models/article.rb +++ b/app/models/article.rb @@ -77,7 +77,7 @@ class Article < ActiveRecord::Base # # Only includes articles where advertise == true def self.recent(limit) - options = { :limit => limit, :conditions => { :advertise => true }, :order => 'created_at desc, articles.id desc' } + options = { :limit => limit, :conditions => { :advertise => true, :public_article => true }, :order => 'created_at desc, articles.id desc' } self.find(:all, options) end diff --git a/test/functional/profile_editor_controller_test.rb b/test/functional/profile_editor_controller_test.rb index ce746b9..b17bdcb 100644 --- a/test/functional/profile_editor_controller_test.rb +++ b/test/functional/profile_editor_controller_test.rb @@ -213,21 +213,6 @@ class ProfileEditorControllerTest < Test::Unit::TestCase assert_equal false, Profile['ze'].public_profile end - should 'display public_content field for editing' do - profile = Profile['ze'] - get :edit, :profile => 'ze' - assert_tag :tag => 'input', :attributes => { :type => 'radio', :checked => 'checked', :name => 'profile_data[public_content]', :value => 'true' } - assert_tag :tag => 'input', :attributes => { :type => 'radio', :name => 'profile_data[public_content]', :value => 'false' } - end - - should 'display properly that the content is non-public' do - profile = Profile['ze'] - profile.update_attributes(:public_content => false) - get :edit, :profile => 'ze' - assert_tag :tag => 'input', :attributes => { :type => 'radio', :checked => 'checked', :name => 'profile_data[public_content]', :value => 'false' } - assert_tag :tag => 'input', :attributes => { :type => 'radio', :name => 'profile_data[public_content]', :value => 'true' } - end - should 'show error messages for invalid foundation_year' do org = Organization.create!(:name => 'test org', :identifier => 'testorg') post :edit, :profile => 'testorg', :profile_data => { :foundation_year => 'aaa' } -- libgit2 0.21.2