Commit 4456c409392bd3096f0684ee58a7a31aa6f3ee8d

Authored by Joenio Costa
2 parents 8577d3f5 933b7716

Merge branch 'stable'

app/models/feed_reader_block.rb
@@ -12,7 +12,7 @@ class FeedReaderBlock < Block @@ -12,7 +12,7 @@ class FeedReaderBlock < Block
12 def address=(new_address) 12 def address=(new_address)
13 old_address = address 13 old_address = address
14 orig_set_address(new_address) 14 orig_set_address(new_address)
15 - self.enabled = (old_address.blank? && !new_address.blank?) || (new_address && new_address != old_address) || false 15 + self.enabled = (new_address && new_address != old_address) || (new_address && self.enabled) || false
16 end 16 end
17 17
18 settings_items :limit, :type => :integer 18 settings_items :limit, :type => :integer
lib/noosfero.rb
1 module Noosfero 1 module Noosfero
2 PROJECT = 'noosfero' 2 PROJECT = 'noosfero'
3 - VERSION = '0.27.0' 3 + VERSION = '0.27.1'
4 4
5 def self.pattern_for_controllers_in_directory(dir) 5 def self.pattern_for_controllers_in_directory(dir)
6 disjunction = controllers_in_directory(dir).join('|') 6 disjunction = controllers_in_directory(dir).join('|')
test/fixtures/environments.yml
@@ -4,7 +4,7 @@ colivre_net: @@ -4,7 +4,7 @@ colivre_net:
4 name: 'Colivre.net' 4 name: 'Colivre.net'
5 contact_email: 'colivre@localhost.localdomain' 5 contact_email: 'colivre@localhost.localdomain'
6 is_default: true 6 is_default: true
7 - theme: 'default' 7 + theme: 'noosfero'
8 anhetegua_net: 8 anhetegua_net:
9 id: 2 9 id: 2
10 name: 'Anheteguá' 10 name: 'Anheteguá'
test/test_helper.rb
@@ -15,6 +15,9 @@ FileUtils.rm_rf(File.join(RAILS_ROOT, 'index', 'test')) @@ -15,6 +15,9 @@ FileUtils.rm_rf(File.join(RAILS_ROOT, 'index', 'test'))
15 Image.attachment_options[:path_prefix] = 'test/tmp/public/images' 15 Image.attachment_options[:path_prefix] = 'test/tmp/public/images'
16 Thumbnail.attachment_options[:path_prefix] = 'test/tmp/public/thumbnails' 16 Thumbnail.attachment_options[:path_prefix] = 'test/tmp/public/thumbnails'
17 17
  18 +FastGettext.add_text_domain 'noosferotest', :type => :chain, :chain => []
  19 +FastGettext.default_text_domain = 'noosferotest'
  20 +
18 class Test::Unit::TestCase 21 class Test::Unit::TestCase
19 # Transactional fixtures accelerate your tests by wrapping each test method 22 # Transactional fixtures accelerate your tests by wrapping each test method
20 # in a transaction that's rolled back on completion. This ensures that the 23 # in a transaction that's rolled back on completion. This ensures that the
test/unit/feed_reader_block_test.rb
@@ -173,4 +173,10 @@ class FeedReaderBlockTest < ActiveSupport::TestCase @@ -173,4 +173,10 @@ class FeedReaderBlockTest < ActiveSupport::TestCase
173 assert_equal true, reader.enabled, 'must enable when setting to new address' 173 assert_equal true, reader.enabled, 'must enable when setting to new address'
174 end 174 end
175 175
  176 + should 'kepp enable when address is not changed' do
  177 + reader = build(:feed_reader_block, :address => 'http://www.example.com/feed')
  178 + reader.address = 'http://www.example.com/feed'
  179 + assert_equal true, reader.enabled
  180 + end
  181 +
176 end 182 end