diff --git a/test/functional/calendars_controller_test.rb b/test/functional/calendars_controller_test.rb index a1036441d..a752f0ec6 100644 --- a/test/functional/calendars_controller_test.rb +++ b/test/functional/calendars_controller_test.rb @@ -30,7 +30,8 @@ class CalendarsControllerTest < Redmine::ControllerTest :issue_relations, :issue_categories, :enumerations, - :queries + :queries, + :users, :email_addresses def test_show with_settings :gravatar_enabled => '1' do @@ -129,7 +130,7 @@ class CalendarsControllerTest < Redmine::ControllerTest get :show, :params => { :query_id => 6 } - + assert_response :success assert_select 'h2', :text => 'Open issues grouped by tracker' end diff --git a/test/functional/gantts_controller_test.rb b/test/functional/gantts_controller_test.rb index 2ca34aef0..cf11f9d66 100644 --- a/test/functional/gantts_controller_test.rb +++ b/test/functional/gantts_controller_test.rb @@ -25,7 +25,8 @@ class GanttsControllerTest < Redmine::ControllerTest :member_roles, :members, :enabled_modules, - :versions + :versions, + :email_addresses def test_gantt_should_work i2 = Issue.find(2) diff --git a/test/functional/news_controller_test.rb b/test/functional/news_controller_test.rb index 90a5a1112..05576f938 100644 --- a/test/functional/news_controller_test.rb +++ b/test/functional/news_controller_test.rb @@ -20,7 +20,7 @@ require File.expand_path('../../test_helper', __FILE__) class NewsControllerTest < Redmine::ControllerTest fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles, :enabled_modules, :news, :comments, - :attachments + :attachments, :user_preferences def setup User.current = nil @@ -116,7 +116,7 @@ class NewsControllerTest < Redmine::ControllerTest :news => { :title => 'NewsControllerTest', :description => 'This is the description', - :summary => '' + :summary => '' } } end @@ -139,11 +139,11 @@ class NewsControllerTest < Redmine::ControllerTest :project_id => 1, :news => { :title => 'Test', - :description => 'This is the description' - }, + :description => 'This is the description' + }, :attachments => { '1' => { - 'file' => uploaded_test_file('testfile.txt', 'text/plain')} + 'file' => uploaded_test_file('testfile.txt', 'text/plain')} } } end @@ -160,7 +160,7 @@ class NewsControllerTest < Redmine::ControllerTest :news => { :title => '', :description => 'This is the description', - :summary => '' + :summary => '' } } assert_response :success @@ -181,7 +181,7 @@ class NewsControllerTest < Redmine::ControllerTest put :update, :params => { :id => 1, :news => { - :description => 'Description changed by test_post_edit' + :description => 'Description changed by test_post_edit' } } assert_redirected_to '/news/1' @@ -197,11 +197,11 @@ class NewsControllerTest < Redmine::ControllerTest put :update, :params => { :id => 1, :news => { - :description => 'This is the description' - }, + :description => 'This is the description' + }, :attachments => { '1' => { - 'file' => uploaded_test_file('testfile.txt', 'text/plain')} + 'file' => uploaded_test_file('testfile.txt', 'text/plain')} } } end @@ -215,7 +215,7 @@ class NewsControllerTest < Redmine::ControllerTest put :update, :params => { :id => 1, :news => { - :description => '' + :description => '' } } assert_response :success diff --git a/test/functional/settings_controller_test.rb b/test/functional/settings_controller_test.rb index 4c1019191..2215aa385 100644 --- a/test/functional/settings_controller_test.rb +++ b/test/functional/settings_controller_test.rb @@ -19,7 +19,7 @@ require File.expand_path('../../test_helper', __FILE__) class SettingsControllerTest < Redmine::ControllerTest fixtures :projects, :trackers, :issue_statuses, :issues, - :users + :users, :email_addresses def setup User.current = nil diff --git a/test/functional/welcome_controller_test.rb b/test/functional/welcome_controller_test.rb index 38533edac..8f486c219 100644 --- a/test/functional/welcome_controller_test.rb +++ b/test/functional/welcome_controller_test.rb @@ -18,7 +18,7 @@ require File.expand_path('../../test_helper', __FILE__) class WelcomeControllerTest < Redmine::ControllerTest - fixtures :projects, :news, :users, :members + fixtures :projects, :news, :users, :members, :roles, :member_roles, :enabled_modules def setup Setting.default_language = 'en' diff --git a/test/unit/custom_field_test.rb b/test/unit/custom_field_test.rb index ab6e09887..89b53caeb 100644 --- a/test/unit/custom_field_test.rb +++ b/test/unit/custom_field_test.rb @@ -20,7 +20,7 @@ require File.expand_path('../../test_helper', __FILE__) class CustomFieldTest < ActiveSupport::TestCase fixtures :custom_fields, :roles, :projects, :trackers, :issue_statuses, - :issues + :issues, :users def setup User.current = nil diff --git a/test/unit/journal_observer_test.rb b/test/unit/journal_observer_test.rb index a03fa402b..d3fb735c7 100644 --- a/test/unit/journal_observer_test.rb +++ b/test/unit/journal_observer_test.rb @@ -20,7 +20,7 @@ require File.expand_path('../../test_helper', __FILE__) class JournalObserverTest < ActiveSupport::TestCase fixtures :issues, :issue_statuses, :journals, :journal_details, :projects, :projects_trackers, :trackers, :enabled_modules, :enumerations, - :users, :email_addresses, :roles + :users, :email_addresses, :roles, :members, :member_roles def setup User.current = nil diff --git a/test/unit/lib/redmine/field_format/version_field_format_test.rb b/test/unit/lib/redmine/field_format/version_field_format_test.rb index 9543d8444..72b6620d1 100644 --- a/test/unit/lib/redmine/field_format/version_field_format_test.rb +++ b/test/unit/lib/redmine/field_format/version_field_format_test.rb @@ -22,7 +22,7 @@ class Redmine::VersionFieldFormatTest < ActionView::TestCase fixtures :projects, :versions, :trackers, :roles, :users, :members, :member_roles, :issue_statuses, :issue_categories, :issue_relations, :workflows, - :enumerations, :custom_fields, :custom_fields_trackers + :enumerations, :custom_fields, :custom_fields_trackers, :enabled_modules def setup super @@ -70,7 +70,7 @@ class Redmine::VersionFieldFormatTest < ActionView::TestCase assert_equal expected, field.possible_values_options(project).map(&:first) end - + def test_possible_values_options_should_return_system_shared_versions_without_project field = IssueCustomField.new(:field_format => 'version') version = Version.generate!(:project => Project.find(1), :status => 'open', :sharing => 'system') diff --git a/test/unit/project_copy_test.rb b/test/unit/project_copy_test.rb index efe3c6dde..19bb13a25 100644 --- a/test/unit/project_copy_test.rb +++ b/test/unit/project_copy_test.rb @@ -36,7 +36,7 @@ class ProjectCopyTest < ActiveSupport::TestCase :boards, :messages, :repositories, :news, :comments, - :documents + :documents, :attachments def setup User.current = nil diff --git a/test/unit/repository_test.rb b/test/unit/repository_test.rb index 65295e38f..c2f64781f 100644 --- a/test/unit/repository_test.rb +++ b/test/unit/repository_test.rb @@ -33,7 +33,9 @@ class RepositoryTest < ActiveSupport::TestCase :members, :member_roles, :roles, - :enumerations + :enumerations, + :user_preferences, + :watchers include Redmine::I18n @@ -263,7 +265,8 @@ class RepositoryTest < ActiveSupport::TestCase assert_equal User.find_by_login('dlopper'), journal.user assert_equal 'Applied in changeset r2.', journal.notes - # 5 email notifications, 2 for #1, 3 for #2 + # 4 emails for 2 members and 2 issues(#1, #2) + # 1 email for a watcher of issue #2 assert_equal 5, ActionMailer::Base.deliveries.size ActionMailer::Base.deliveries.first(2).each do |mail| assert_not_nil mail