Commit 97b77defcd22c2a885b7c176a1565be7b2c9a83e

Authored by Rodrigo Souto
1 parent 0e350c7c

[postgres-tests] Fixing person tests

Showing 1 changed file with 2 additions and 0 deletions   Show diff stats
test/unit/person_test.rb
... ... @@ -1228,6 +1228,7 @@ class PersonTest < ActiveSupport::TestCase
1228 1228 person = fast_create(Person)
1229 1229 another_person = fast_create(Person)
1230 1230  
  1231 + UserStampSweeper.any_instance.stubs(:current_user).returns(another_person)
1231 1232 scrap = Scrap.create!(defaults_for_scrap(:sender => another_person, :receiver => person, :content => 'A scrap'))
1232 1233 UserStampSweeper.any_instance.expects(:current_user).returns(person).at_least_once
1233 1234 article = TinyMceArticle.create!(:profile => person, :name => 'An article about free software')
... ... @@ -1243,6 +1244,7 @@ class PersonTest < ActiveSupport::TestCase
1243 1244 person_scrap = Scrap.create!(defaults_for_scrap(:sender => person, :receiver => person, :content => 'A scrap from person'))
1244 1245 another_person_scrap = Scrap.create!(defaults_for_scrap(:sender => another_person, :receiver => another_person, :content => 'A scrap from another person'))
1245 1246  
  1247 + UserStampSweeper.any_instance.stubs(:current_user).returns(another_person)
1246 1248 TinyMceArticle.create!(:profile => another_person, :name => 'An article about free software from another person')
1247 1249 another_person_activity = ActionTracker::Record.last
1248 1250  
... ...