Merged r2563, r2566, r2567, r2568, r2569, r2582 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.8-stable@2650 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -51,6 +51,8 @@ class IssuesControllerTest < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_index
|
||||
Setting.default_language = 'en'
|
||||
|
||||
get :index
|
||||
assert_response :success
|
||||
assert_template 'index.rhtml'
|
||||
@@ -61,6 +63,8 @@ class IssuesControllerTest < Test::Unit::TestCase
|
||||
# private projects hidden
|
||||
assert_no_tag :tag => 'a', :content => /Issue of a private subproject/
|
||||
assert_no_tag :tag => 'a', :content => /Issue on project 2/
|
||||
# project column
|
||||
assert_tag :tag => 'th', :content => /Project/
|
||||
end
|
||||
|
||||
def test_index_should_not_list_issues_when_module_disabled
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
require File.dirname(__FILE__) + '/../test_helper'
|
||||
|
||||
class ActivityTest < Test::Unit::TestCase
|
||||
fixtures :projects, :versions, :users, :roles, :members, :issues, :journals, :journal_details,
|
||||
fixtures :projects, :versions, :attachments, :users, :roles, :members, :issues, :journals, :journal_details,
|
||||
:trackers, :projects_trackers, :issue_statuses, :enabled_modules, :enumerations, :boards, :messages
|
||||
|
||||
def setup
|
||||
@@ -72,6 +72,18 @@ class ActivityTest < Test::Unit::TestCase
|
||||
assert_nil(events.detect {|e| e.event_author != user})
|
||||
end
|
||||
|
||||
def test_files_activity
|
||||
f = Redmine::Activity::Fetcher.new(User.anonymous, :project => Project.find(1))
|
||||
f.scope = ['files']
|
||||
events = f.events
|
||||
|
||||
assert_kind_of Array, events
|
||||
assert events.include?(Attachment.find_by_container_type_and_container_id('Project', 1))
|
||||
assert events.include?(Attachment.find_by_container_type_and_container_id('Version', 1))
|
||||
assert_equal [Attachment], events.collect(&:class).uniq
|
||||
assert_equal %w(Project Version), events.collect(&:container_type).uniq.sort
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def find_events(user, options={})
|
||||
|
||||
Reference in New Issue
Block a user