diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-11-30 11:18:22 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-11-30 11:18:22 +0000 |
commit | fce4615f10ad81b9070e65a45f9d37b1c571ccd7 (patch) | |
tree | b922752605cd207cf51e72866f435af8427ea468 /test | |
parent | b5fcea9e7414647533ee333485ed8c93b9cff82f (diff) | |
download | redmine-fce4615f10ad81b9070e65a45f9d37b1c571ccd7.tar.gz redmine-fce4615f10ad81b9070e65a45f9d37b1c571ccd7.zip |
Display latest user's activity on account/show view.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2066 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/activity_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/activity_test.rb b/test/unit/activity_test.rb index ccda9f119..e5bc0d266 100644 --- a/test/unit/activity_test.rb +++ b/test/unit/activity_test.rb @@ -63,6 +63,15 @@ class ActivityTest < Test::Unit::TestCase assert events.include?(Issue.find(4)) end + def test_user_activity + user = User.find(2) + events = Redmine::Activity::Fetcher.new(User.anonymous, :author => user).events(nil, nil, :limit => 10) + + assert(events.size > 0) + assert(events.size <= 10) + assert_nil(events.detect {|e| e.event_author != user}) + end + private def find_events(user, options={}) |