diff --git a/test/functional/search_controller_test.rb b/test/functional/search_controller_test.rb index 8bc4862..a8f91e4 100644 --- a/test/functional/search_controller_test.rb +++ b/test/functional/search_controller_test.rb @@ -316,7 +316,7 @@ class SearchControllerTest < ActionController::TestCase ev1 = create_event(person, :name => 'event 1', :category_ids => [@category.id], :start_date => ten_days_ago) ev2 = create_event(person, :name => 'event 2', :category_ids => [@category.id], :start_date => DateTime.now - 2.month) - get :events, day: ten_days_ago.day+1.second, month: ten_days_ago.month, year: ten_days_ago.year + get :events, day: ten_days_ago.day, month: ten_days_ago.month, year: ten_days_ago.year assert_equal [ev1], assigns(:events) end @@ -329,7 +329,7 @@ class SearchControllerTest < ActionController::TestCase ev2 = create_event(person, :name => 'event 2', :start_date => ten_days_ago) - get :events, day: ten_days_ago.day+1.second, month: ten_days_ago.month, year: ten_days_ago.year, category_path: @category.path.split('/') + get :events, day: ten_days_ago.day, month: ten_days_ago.month, year: ten_days_ago.year, category_path: @category.path.split('/') assert_equal [ev1], assigns(:events) end diff --git a/test/unit/person_notifier_test.rb b/test/unit/person_notifier_test.rb index f96da54..795c518 100644 --- a/test/unit/person_notifier_test.rb +++ b/test/unit/person_notifier_test.rb @@ -48,6 +48,8 @@ class PersonNotifierTest < ActiveSupport::TestCase should 'display author name in delivered mail' do @community.add_member(@member) + ActionMailer::Base.deliveries.clear + Comment.create!(:author => @admin, :title => 'test comment', :body => 'body!', :source => @article) process_delayed_job_queue notify diff --git a/test/unit/scrap_test.rb b/test/unit/scrap_test.rb index 09886c2..7a72a82 100644 --- a/test/unit/scrap_test.rb +++ b/test/unit/scrap_test.rb @@ -88,7 +88,8 @@ class ScrapTest < ActiveSupport::TestCase end should "create the leave_scrap action tracker verb on scrap creation of one user to another" do - p1 = create_user.person + User.current = create_user + p1 = User.current.person p2 = create_user.person s = Scrap.new s.sender= p1 @@ -105,7 +106,8 @@ class ScrapTest < ActiveSupport::TestCase end should "create the leave_scrap action tracker verb on scrap creation of one user to community" do - p = create_user.person + User.current = create_user + p = User.current.person c = fast_create(Community) s = Scrap.new s.sender= p @@ -163,7 +165,8 @@ class ScrapTest < ActiveSupport::TestCase end should "create the leave_scrap_to_self action tracker verb on scrap creation of one user to itself" do - p = create_user.person + User.current = create_user + p = User.current.person s = Scrap.new s.sender= p s.receiver= p -- libgit2 0.21.2