Commit 47974a893b00a425cc234931c296e3b8f0adcfe2
1 parent
38427d37
Exists in
master
and in
28 other branches
Finishing unit test action item 2722
Showing
1 changed file
with
7 additions
and
6 deletions
Show diff stats
test/unit/person_test.rb
@@ -1337,21 +1337,22 @@ class PersonTest < ActiveSupport::TestCase | @@ -1337,21 +1337,22 @@ class PersonTest < ActiveSupport::TestCase | ||
1337 | 1337 | ||
1338 | should 'not list leave_scrap_to_self in activities' do | 1338 | should 'not list leave_scrap_to_self in activities' do |
1339 | person = fast_create(Person) | 1339 | person = fast_create(Person) |
1340 | - at = fast_create(ActionTracker::Record, :user_type => 'Person', :user_id => person.id, :verb => 'leave_scrap_to_self') | ||
1341 | - assert_not_includes person.activities, at | 1340 | + at = ActionTracker::Record.create!(:user => person, :verb => 'leave_scrap_to_self') |
1341 | + person.reload | ||
1342 | + assert_equal person.activities, [] | ||
1342 | end | 1343 | end |
1343 | 1344 | ||
1344 | should 'not list add_member_in_community in activities' do | 1345 | should 'not list add_member_in_community in activities' do |
1345 | person = fast_create(Person) | 1346 | person = fast_create(Person) |
1346 | - at = fast_create(ActionTracker::Record, :user_type => 'Person', :user_id => person.id, :verb => 'add_member_in_community') | ||
1347 | - assert_not_includes person.activities, at | 1347 | + at = ActionTracker::Record.create!(:user => person, :verb => 'add_member_in_community') |
1348 | + person.reload | ||
1349 | + assert_equal person.activities, [] | ||
1348 | end | 1350 | end |
1349 | 1351 | ||
1350 | should 'not list reply_scrap_on_self in activities' do | 1352 | should 'not list reply_scrap_on_self in activities' do |
1351 | person = fast_create(Person) | 1353 | person = fast_create(Person) |
1352 | at = ActionTracker::Record.create!(:user => person, :verb => 'reply_scrap_on_self') | 1354 | at = ActionTracker::Record.create!(:user => person, :verb => 'reply_scrap_on_self') |
1353 | person.reload | 1355 | person.reload |
1354 | - pp person.activities | ||
1355 | - assert_not_includes person.activities, at | 1356 | + assert_equal person.activities, [] |
1356 | end | 1357 | end |
1357 | end | 1358 | end |