Commit ae3e67e3bccb0dd1793f50775f1c16030579d75c
Exists in
master
and in
29 other branches
Merge branch 'stable'
Conflicts: debian/changelog lib/noosfero.rb
Showing
3 changed files
with
7 additions
and
8 deletions
Show diff stats
app/models/user.rb
@@ -328,7 +328,7 @@ class User < ActiveRecord::Base | @@ -328,7 +328,7 @@ class User < ActiveRecord::Base | ||
328 | end | 328 | end |
329 | 329 | ||
330 | def deliver_activation_code | 330 | def deliver_activation_code |
331 | - return if person.is_template? | 331 | + return if person.identifier =~ /person_template/ |
332 | User::Mailer.deliver_activation_code(self) unless self.activation_code.blank? | 332 | User::Mailer.deliver_activation_code(self) unless self.activation_code.blank? |
333 | end | 333 | end |
334 | 334 |
debian/changelog
@@ -4,6 +4,12 @@ noosfero (0.39.0~1) UNRELEASED; urgency=low | @@ -4,6 +4,12 @@ noosfero (0.39.0~1) UNRELEASED; urgency=low | ||
4 | 4 | ||
5 | -- Antonio Terceiro <terceiro@debian.org> Thu, 30 Aug 2012 14:55:10 -0300 | 5 | -- Antonio Terceiro <terceiro@debian.org> Thu, 30 Aug 2012 14:55:10 -0300 |
6 | 6 | ||
7 | +noosfero (0.38.3) unstable; urgency=low | ||
8 | + | ||
9 | + * Bugfixes release | ||
10 | + | ||
11 | + -- Daniela Soares Feitosa <daniela@colivre.coop.br> Wed, 07 Nov 2012 20:25:51 -0200 | ||
12 | + | ||
7 | noosfero (0.38.2) unstable; urgency=low | 13 | noosfero (0.38.2) unstable; urgency=low |
8 | 14 | ||
9 | * Bugfixes release | 15 | * Bugfixes release |
test/unit/user_test.rb
@@ -447,13 +447,6 @@ class UserTest < ActiveSupport::TestCase | @@ -447,13 +447,6 @@ class UserTest < ActiveSupport::TestCase | ||
447 | assert_equal 'pending@activation.com', ActionMailer::Base.deliveries.last['to'].to_s | 447 | assert_equal 'pending@activation.com', ActionMailer::Base.deliveries.last['to'].to_s |
448 | end | 448 | end |
449 | 449 | ||
450 | - should 'not try to deliver email to template users' do | ||
451 | - Person.any_instance.stubs(:is_template?).returns(true) | ||
452 | - assert_no_difference ActionMailer::Base.deliveries, :size do | ||
453 | - new_user | ||
454 | - end | ||
455 | - end | ||
456 | - | ||
457 | should 'not mass assign activated at' do | 450 | should 'not mass assign activated at' do |
458 | user = User.new :activated_at => 5.days.ago | 451 | user = User.new :activated_at => 5.days.ago |
459 | assert_nil user.activated_at | 452 | assert_nil user.activated_at |