Upgraded to Rails 2.3.4 (#3597)

* Ran the Rails upgrade
* Upgraded to Rails Engines 2.3.2
* Added a plugin to let Engines override application views.
* Converted tests to use the new classes:
** ActionController::TestCase for functional
** ActiveSupport::TestCase for units
* Converted ActiveRecord::Error message to a string.
* ActiveRecord grouping returns an ordered hash which doesn't have #sort!
* Updated the I18n storage_units format.
* Added some default initializers from a fresh rails app
* Changed the order of check_box_tags and hidden_field_tags.  The hidden tag
  needs to appear first in Rails 2.3, otherwise it will override any value in
  the check_box_tag.
* Removed the custom handler for when the cookie store is tampered with.
  Rails 2.3 removed the TamperedWithCookie exception and instead Rails will not
  load the data from it when it's been tampered with (e.g. no user login).
* Fixed mail layouts, 2.3 has problems with implicit multipart emails that
  use layouts.  Also removed some custom Redmine mailer code.
* Fixed a bug that occurred in tests where the "required" span tag would be
  added to the :field_status translation.  This resulted in an email string of:

    <li>Status<span class="required"> *</span><span class="required"> *</span>

  Instead of:

    <li>Status: New</li>

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2887 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis 2009-09-13 17:14:35 +00:00
parent fb349dc4ab
commit 7b0cb6aba8
263 changed files with 1636 additions and 440 deletions

View File

@ -21,11 +21,6 @@ require 'cgi'
class ApplicationController < ActionController::Base class ApplicationController < ActionController::Base
include Redmine::I18n include Redmine::I18n
# In case the cookie store secret changes
rescue_from CGI::Session::CookieStore::TamperedWithCookie do |exception|
render :text => 'Your session was invalid and has been reset. Please, reload this page.', :status => 500
end
layout 'base' layout 'base'
before_filter :user_setup, :check_if_login_required, :set_localization before_filter :user_setup, :check_if_login_required, :set_localization

View File

@ -259,7 +259,7 @@ private
def graph_commits_per_author(repository) def graph_commits_per_author(repository)
commits_by_author = repository.changesets.count(:all, :group => :committer) commits_by_author = repository.changesets.count(:all, :group => :committer)
commits_by_author.sort! {|x, y| x.last <=> y.last} commits_by_author.to_a.sort! {|x, y| x.last <=> y.last}
changes_by_author = repository.changes.count(:all, :group => :committer) changes_by_author = repository.changes.count(:all, :group => :committer)
h = changes_by_author.inject({}) {|o, i| o[i.first] = i.last; o} h = changes_by_author.inject({}) {|o, i| o[i.first] = i.last; o}

View File

@ -16,6 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class Mailer < ActionMailer::Base class Mailer < ActionMailer::Base
layout 'mailer'
helper :application helper :application
helper :issues helper :issues
helper :custom_fields helper :custom_fields
@ -45,6 +46,7 @@ class Mailer < ActionMailer::Base
subject "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] (#{issue.status.name}) #{issue.subject}" subject "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] (#{issue.status.name}) #{issue.subject}"
body :issue => issue, body :issue => issue,
:issue_url => url_for(:controller => 'issues', :action => 'show', :id => issue) :issue_url => url_for(:controller => 'issues', :action => 'show', :id => issue)
render_multipart('issue_add', body)
end end
# Builds a tmail object used to email recipients of the edited issue. # Builds a tmail object used to email recipients of the edited issue.
@ -71,6 +73,8 @@ class Mailer < ActionMailer::Base
body :issue => issue, body :issue => issue,
:journal => journal, :journal => journal,
:issue_url => url_for(:controller => 'issues', :action => 'show', :id => issue) :issue_url => url_for(:controller => 'issues', :action => 'show', :id => issue)
render_multipart('issue_edit', body)
end end
def reminder(user, issues, days) def reminder(user, issues, days)
@ -80,6 +84,7 @@ class Mailer < ActionMailer::Base
body :issues => issues, body :issues => issues,
:days => days, :days => days,
:issues_url => url_for(:controller => 'issues', :action => 'index', :set_filter => 1, :assigned_to_id => user.id, :sort_key => 'due_date', :sort_order => 'asc') :issues_url => url_for(:controller => 'issues', :action => 'index', :set_filter => 1, :assigned_to_id => user.id, :sort_key => 'due_date', :sort_order => 'asc')
render_multipart('reminder', body)
end end
# Builds a tmail object used to email users belonging to the added document's project. # Builds a tmail object used to email users belonging to the added document's project.
@ -93,6 +98,7 @@ class Mailer < ActionMailer::Base
subject "[#{document.project.name}] #{l(:label_document_new)}: #{document.title}" subject "[#{document.project.name}] #{l(:label_document_new)}: #{document.title}"
body :document => document, body :document => document,
:document_url => url_for(:controller => 'documents', :action => 'show', :id => document) :document_url => url_for(:controller => 'documents', :action => 'show', :id => document)
render_multipart('document_added', body)
end end
# Builds a tmail object used to email recipients of a project when an attachements are added. # Builds a tmail object used to email recipients of a project when an attachements are added.
@ -121,6 +127,7 @@ class Mailer < ActionMailer::Base
body :attachments => attachments, body :attachments => attachments,
:added_to => added_to, :added_to => added_to,
:added_to_url => added_to_url :added_to_url => added_to_url
render_multipart('attachments_added', body)
end end
# Builds a tmail object used to email recipients of a news' project when a news item is added. # Builds a tmail object used to email recipients of a news' project when a news item is added.
@ -135,6 +142,7 @@ class Mailer < ActionMailer::Base
subject "[#{news.project.name}] #{l(:label_news)}: #{news.title}" subject "[#{news.project.name}] #{l(:label_news)}: #{news.title}"
body :news => news, body :news => news,
:news_url => url_for(:controller => 'news', :action => 'show', :id => news) :news_url => url_for(:controller => 'news', :action => 'show', :id => news)
render_multipart('news_added', body)
end end
# Builds a tmail object used to email the specified recipients of the specified message that was posted. # Builds a tmail object used to email the specified recipients of the specified message that was posted.
@ -151,6 +159,7 @@ class Mailer < ActionMailer::Base
subject "[#{message.board.project.name} - #{message.board.name} - msg#{message.root.id}] #{message.subject}" subject "[#{message.board.project.name} - #{message.board.name} - msg#{message.root.id}] #{message.subject}"
body :message => message, body :message => message,
:message_url => url_for(:controller => 'messages', :action => 'show', :board_id => message.board_id, :id => message.root) :message_url => url_for(:controller => 'messages', :action => 'show', :board_id => message.board_id, :id => message.root)
render_multipart('message_posted', body)
end end
# Builds a tmail object used to email the recipients of a project of the specified wiki content was added. # Builds a tmail object used to email the recipients of a project of the specified wiki content was added.
@ -167,6 +176,7 @@ class Mailer < ActionMailer::Base
subject "[#{wiki_content.project.name}] #{l(:mail_subject_wiki_content_added, :page => wiki_content.page.pretty_title)}" subject "[#{wiki_content.project.name}] #{l(:mail_subject_wiki_content_added, :page => wiki_content.page.pretty_title)}"
body :wiki_content => wiki_content, body :wiki_content => wiki_content,
:wiki_content_url => url_for(:controller => 'wiki', :action => 'index', :id => wiki_content.project, :page => wiki_content.page.title) :wiki_content_url => url_for(:controller => 'wiki', :action => 'index', :id => wiki_content.project, :page => wiki_content.page.title)
render_multipart('wiki_content_added', body)
end end
# Builds a tmail object used to email the recipients of a project of the specified wiki content was updated. # Builds a tmail object used to email the recipients of a project of the specified wiki content was updated.
@ -184,6 +194,7 @@ class Mailer < ActionMailer::Base
body :wiki_content => wiki_content, body :wiki_content => wiki_content,
:wiki_content_url => url_for(:controller => 'wiki', :action => 'index', :id => wiki_content.project, :page => wiki_content.page.title), :wiki_content_url => url_for(:controller => 'wiki', :action => 'index', :id => wiki_content.project, :page => wiki_content.page.title),
:wiki_diff_url => url_for(:controller => 'wiki', :action => 'diff', :id => wiki_content.project, :page => wiki_content.page.title, :version => wiki_content.version) :wiki_diff_url => url_for(:controller => 'wiki', :action => 'diff', :id => wiki_content.project, :page => wiki_content.page.title, :version => wiki_content.version)
render_multipart('wiki_content_updated', body)
end end
# Builds a tmail object used to email the specified user their account information. # Builds a tmail object used to email the specified user their account information.
@ -198,6 +209,7 @@ class Mailer < ActionMailer::Base
body :user => user, body :user => user,
:password => password, :password => password,
:login_url => url_for(:controller => 'account', :action => 'login') :login_url => url_for(:controller => 'account', :action => 'login')
render_multipart('account_information', body)
end end
# Builds a tmail object used to email all active administrators of an account activation request. # Builds a tmail object used to email all active administrators of an account activation request.
@ -211,6 +223,7 @@ class Mailer < ActionMailer::Base
subject l(:mail_subject_account_activation_request, Setting.app_title) subject l(:mail_subject_account_activation_request, Setting.app_title)
body :user => user, body :user => user,
:url => url_for(:controller => 'users', :action => 'index', :status => User::STATUS_REGISTERED, :sort_key => 'created_on', :sort_order => 'desc') :url => url_for(:controller => 'users', :action => 'index', :status => User::STATUS_REGISTERED, :sort_key => 'created_on', :sort_order => 'desc')
render_multipart('account_activation_request', body)
end end
# Builds a tmail object used to email the specified user that their account was activated by an administrator. # Builds a tmail object used to email the specified user that their account was activated by an administrator.
@ -224,6 +237,7 @@ class Mailer < ActionMailer::Base
subject l(:mail_subject_register, Setting.app_title) subject l(:mail_subject_register, Setting.app_title)
body :user => user, body :user => user,
:login_url => url_for(:controller => 'account', :action => 'login') :login_url => url_for(:controller => 'account', :action => 'login')
render_multipart('account_activated', body)
end end
def lost_password(token) def lost_password(token)
@ -232,6 +246,7 @@ class Mailer < ActionMailer::Base
subject l(:mail_subject_lost_password, Setting.app_title) subject l(:mail_subject_lost_password, Setting.app_title)
body :token => token, body :token => token,
:url => url_for(:controller => 'account', :action => 'lost_password', :token => token.value) :url => url_for(:controller => 'account', :action => 'lost_password', :token => token.value)
render_multipart('lost_password', body)
end end
def register(token) def register(token)
@ -240,6 +255,7 @@ class Mailer < ActionMailer::Base
subject l(:mail_subject_register, Setting.app_title) subject l(:mail_subject_register, Setting.app_title)
body :token => token, body :token => token,
:url => url_for(:controller => 'account', :action => 'activate', :token => token.value) :url => url_for(:controller => 'account', :action => 'activate', :token => token.value)
render_multipart('register', body)
end end
def test(user) def test(user)
@ -247,6 +263,7 @@ class Mailer < ActionMailer::Base
recipients user.mail recipients user.mail
subject 'Redmine test' subject 'Redmine test'
body :url => url_for(:controller => 'welcome') body :url => url_for(:controller => 'welcome')
render_multipart('test', body)
end end
# Overrides default deliver! method to prevent from sending an email # Overrides default deliver! method to prevent from sending an email
@ -327,26 +344,17 @@ class Mailer < ActionMailer::Base
super super
end end
# Renders a message with the corresponding layout # Rails 2.3 has problems rendering implicit multipart messages with
def render_message(method_name, body) # layouts so this method will wrap an multipart messages with
layout = method_name.to_s.match(%r{text\.html\.(rhtml|rxml)}) ? 'layout.text.html.rhtml' : 'layout.text.plain.rhtml' # explicit parts.
body[:content_for_layout] = render(:file => method_name, :body => body) #
ActionView::Base.new(template_root, body, self).render(:file => "mailer/#{layout}", :use_full_path => true) # https://rails.lighthouseapp.com/projects/8994/tickets/2338-actionmailer-mailer-views-and-content-type
end # https://rails.lighthouseapp.com/projects/8994/tickets/1799-actionmailer-doesnt-set-template_format-when-rendering-layouts
# for the case of plain text only def render_multipart(method_name, body)
def body(*params) content_type "multipart/alternative"
value = super(*params) part :content_type => "text/plain", :body => render(:file => "#{method_name}.text.plain.rhtml", :body => body, :layout => 'mailer.text.plain.erb')
if Setting.plain_text_mail? part :content_type => "text/html", :body => render_message("#{method_name}.text.html.rhtml", body) unless Setting.plain_text_mail?
templates = Dir.glob("#{template_path}/#{@template}.text.plain.{rhtml,erb}")
unless String === @body or templates.empty?
template = File.basename(templates.first)
@body[:content_for_layout] = render(:file => template, :body => @body)
@body = ActionView::Base.new(template_root, @body, self).render(:file => "mailer/layout.text.plain.rhtml", :use_full_path => true)
return @body
end
end
return value
end end
# Makes partial rendering work with Rails 1.2 (retro-compatibility) # Makes partial rendering work with Rails 1.2 (retro-compatibility)

View File

@ -2,7 +2,9 @@
<div class="box tabular settings"> <div class="box tabular settings">
<p><label><%= l(:setting_login_required) %></label> <p><label><%= l(:setting_login_required) %></label>
<%= check_box_tag 'settings[login_required]', 1, Setting.login_required? %><%= hidden_field_tag 'settings[login_required]', 0 %></p> <%= hidden_field_tag 'settings[login_required]', 0 %>
<%= check_box_tag 'settings[login_required]', 1, Setting.login_required? %>
</p>
<p><label><%= l(:setting_autologin) %></label> <p><label><%= l(:setting_autologin) %></label>
<%= select_tag 'settings[autologin]', options_for_select( [[l(:label_disabled), "0"]] + [1, 7, 30, 365].collect{|days| [l('datetime.distance_in_words.x_days', :count => days), days.to_s]}, Setting.autologin) %></p> <%= select_tag 'settings[autologin]', options_for_select( [[l(:label_disabled), "0"]] + [1, 7, 30, 365].collect{|days| [l('datetime.distance_in_words.x_days', :count => days), days.to_s]}, Setting.autologin) %></p>
@ -19,10 +21,14 @@
<%= text_field_tag 'settings[password_min_length]', Setting.password_min_length, :size => 6 %></p> <%= text_field_tag 'settings[password_min_length]', Setting.password_min_length, :size => 6 %></p>
<p><label><%= l(:label_password_lost) %></label> <p><label><%= l(:label_password_lost) %></label>
<%= check_box_tag 'settings[lost_password]', 1, Setting.lost_password? %><%= hidden_field_tag 'settings[lost_password]', 0 %></p> <%= hidden_field_tag 'settings[lost_password]', 0 %>
<%= check_box_tag 'settings[lost_password]', 1, Setting.lost_password? %>
</p>
<p><label><%= l(:setting_openid) %></label> <p><label><%= l(:setting_openid) %></label>
<%= check_box_tag 'settings[openid]', 1, Setting.openid?, :disabled => !Object.const_defined?(:OpenID) %><%= hidden_field_tag 'settings[openid]', 0 %></p> <%= hidden_field_tag 'settings[openid]', 0 %>
<%= check_box_tag 'settings[openid]', 1, Setting.openid?, :disabled => !Object.const_defined?(:OpenID) %>
</p>
</div> </div>
<div style="float:right;"> <div style="float:right;">

View File

@ -17,7 +17,9 @@
<%= select_tag 'settings[user_format]', options_for_select( @options[:user_format], Setting.user_format.to_s ) %></p> <%= select_tag 'settings[user_format]', options_for_select( @options[:user_format], Setting.user_format.to_s ) %></p>
<p><label><%= l(:setting_gravatar_enabled) %></label> <p><label><%= l(:setting_gravatar_enabled) %></label>
<%= check_box_tag 'settings[gravatar_enabled]', 1, Setting.gravatar_enabled? %><%= hidden_field_tag 'settings[gravatar_enabled]', 0 %></p> <%= hidden_field_tag 'settings[gravatar_enabled]', 0 %>
<%= check_box_tag 'settings[gravatar_enabled]', 1, Setting.gravatar_enabled? %>
</p>
</div> </div>
<%= submit_tag l(:button_save) %> <%= submit_tag l(:button_save) %>

View File

@ -2,10 +2,14 @@
<div class="box tabular settings"> <div class="box tabular settings">
<p><label><%= l(:setting_cross_project_issue_relations) %></label> <p><label><%= l(:setting_cross_project_issue_relations) %></label>
<%= check_box_tag 'settings[cross_project_issue_relations]', 1, Setting.cross_project_issue_relations? %><%= hidden_field_tag 'settings[cross_project_issue_relations]', 0 %></p> <%= hidden_field_tag 'settings[cross_project_issue_relations]', 0 %>
<%= check_box_tag 'settings[cross_project_issue_relations]', 1, Setting.cross_project_issue_relations? %>
</p>
<p><label><%= l(:setting_display_subprojects_issues) %></label> <p><label><%= l(:setting_display_subprojects_issues) %></label>
<%= check_box_tag 'settings[display_subprojects_issues]', 1, Setting.display_subprojects_issues? %><%= hidden_field_tag 'settings[display_subprojects_issues]', 0 %></p> <%= hidden_field_tag 'settings[display_subprojects_issues]', 0 %>
<%= check_box_tag 'settings[display_subprojects_issues]', 1, Setting.display_subprojects_issues? %>
</p>
<p><label><%= l(:setting_issues_export_limit) %></label> <p><label><%= l(:setting_issues_export_limit) %></label>
<%= text_field_tag 'settings[issues_export_limit]', Setting.issues_export_limit, :size => 6 %></p> <%= text_field_tag 'settings[issues_export_limit]', Setting.issues_export_limit, :size => 6 %></p>

View File

@ -2,9 +2,10 @@
<div class="box tabular settings"> <div class="box tabular settings">
<p><label><%= l(:setting_mail_handler_api_enabled) %></label> <p><label><%= l(:setting_mail_handler_api_enabled) %></label>
<%= hidden_field_tag 'settings[mail_handler_api_enabled]', 0 %>
<%= check_box_tag 'settings[mail_handler_api_enabled]', 1, Setting.mail_handler_api_enabled?, <%= check_box_tag 'settings[mail_handler_api_enabled]', 1, Setting.mail_handler_api_enabled?,
:onclick => "if (this.checked) { Form.Element.enable('settings_mail_handler_api_key'); } else { Form.Element.disable('settings_mail_handler_api_key'); }" %> :onclick => "if (this.checked) { Form.Element.enable('settings_mail_handler_api_key'); } else { Form.Element.disable('settings_mail_handler_api_key'); }" %>
<%= hidden_field_tag 'settings[mail_handler_api_enabled]', 0 %></p> </p>
<p><label><%= l(:setting_mail_handler_api_key) %></label> <p><label><%= l(:setting_mail_handler_api_key) %></label>
<%= text_field_tag 'settings[mail_handler_api_key]', Setting.mail_handler_api_key, <%= text_field_tag 'settings[mail_handler_api_key]', Setting.mail_handler_api_key,

View File

@ -6,12 +6,14 @@
<%= text_field_tag 'settings[mail_from]', Setting.mail_from, :size => 60 %></p> <%= text_field_tag 'settings[mail_from]', Setting.mail_from, :size => 60 %></p>
<p><label><%= l(:setting_bcc_recipients) %></label> <p><label><%= l(:setting_bcc_recipients) %></label>
<%= hidden_field_tag 'settings[bcc_recipients]', 0 %>
<%= check_box_tag 'settings[bcc_recipients]', 1, Setting.bcc_recipients? %> <%= check_box_tag 'settings[bcc_recipients]', 1, Setting.bcc_recipients? %>
<%= hidden_field_tag 'settings[bcc_recipients]', 0 %></p> </p>
<p><label><%= l(:setting_plain_text_mail) %></label> <p><label><%= l(:setting_plain_text_mail) %></label>
<%= hidden_field_tag 'settings[plain_text_mail]', 0 %>
<%= check_box_tag 'settings[plain_text_mail]', 1, Setting.plain_text_mail? %> <%= check_box_tag 'settings[plain_text_mail]', 1, Setting.plain_text_mail? %>
<%= hidden_field_tag 'settings[plain_text_mail]', 0 %></p> </p>
</div> </div>
<fieldset class="box" id="notified_events"><legend><%=l(:text_select_mail_notifications)%></legend> <fieldset class="box" id="notified_events"><legend><%=l(:text_select_mail_notifications)%></legend>

View File

@ -2,10 +2,14 @@
<div class="box tabular settings"> <div class="box tabular settings">
<p><label><%= l(:setting_default_projects_public) %></label> <p><label><%= l(:setting_default_projects_public) %></label>
<%= check_box_tag 'settings[default_projects_public]', 1, Setting.default_projects_public? %><%= hidden_field_tag 'settings[default_projects_public]', 0 %></p> <%= hidden_field_tag 'settings[default_projects_public]', 0 %>
<%= check_box_tag 'settings[default_projects_public]', 1, Setting.default_projects_public? %>
</p>
<p><label><%= l(:setting_sequential_project_identifiers) %></label> <p><label><%= l(:setting_sequential_project_identifiers) %></label>
<%= check_box_tag 'settings[sequential_project_identifiers]', 1, Setting.sequential_project_identifiers? %><%= hidden_field_tag 'settings[sequential_project_identifiers]', 0 %></p> <%= hidden_field_tag 'settings[sequential_project_identifiers]', 0 %>
<%= check_box_tag 'settings[sequential_project_identifiers]', 1, Setting.sequential_project_identifiers? %>
</p>
<p><label><%= l(:setting_new_project_user_role_id) %></label> <p><label><%= l(:setting_new_project_user_role_id) %></label>
<%= select_tag('settings[new_project_user_role_id]', options_for_select([["--- #{l(:actionview_instancetag_blank_option)} ---", '']] + Role.find_all_givable.collect {|r| [r.name, r.id]}, Setting.new_project_user_role_id.to_i)) %></p> <%= select_tag('settings[new_project_user_role_id]', options_for_select([["--- #{l(:actionview_instancetag_blank_option)} ---", '']] + Role.find_all_givable.collect {|r| [r.name, r.id]}, Setting.new_project_user_role_id.to_i)) %></p>

View File

@ -2,10 +2,14 @@
<div class="box tabular settings"> <div class="box tabular settings">
<p><label><%= l(:setting_autofetch_changesets) %></label> <p><label><%= l(:setting_autofetch_changesets) %></label>
<%= check_box_tag 'settings[autofetch_changesets]', 1, Setting.autofetch_changesets? %><%= hidden_field_tag 'settings[autofetch_changesets]', 0 %></p> <%= hidden_field_tag 'settings[autofetch_changesets]', 0 %>
<%= check_box_tag 'settings[autofetch_changesets]', 1, Setting.autofetch_changesets? %>
</p>
<p><label><%= l(:setting_sys_api_enabled) %></label> <p><label><%= l(:setting_sys_api_enabled) %></label>
<%= check_box_tag 'settings[sys_api_enabled]', 1, Setting.sys_api_enabled? %><%= hidden_field_tag 'settings[sys_api_enabled]', 0 %></p> <%= hidden_field_tag 'settings[sys_api_enabled]', 0 %>
<%= check_box_tag 'settings[sys_api_enabled]', 1, Setting.sys_api_enabled? %>
</p>
<p><label><%= l(:setting_enabled_scm) %></label> <p><label><%= l(:setting_enabled_scm) %></label>
<% REDMINE_SUPPORTED_SCM.each do |scm| -%> <% REDMINE_SUPPORTED_SCM.each do |scm| -%>

View File

@ -1,7 +1,7 @@
# Don't change this file! # Don't change this file!
# Configure your app in config/environment.rb and config/environments/*.rb # Configure your app in config/environment.rb and config/environments/*.rb
RAILS_ROOT = File.expand_path("#{File.dirname(__FILE__)}/..") unless defined?(RAILS_ROOT) RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
module Rails module Rails
class << self class << self
@ -44,6 +44,7 @@ module Rails
def load_initializer def load_initializer
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer" require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
Rails::Initializer.run(:install_gem_spec_stubs) Rails::Initializer.run(:install_gem_spec_stubs)
Rails::GemDependency.add_frozen_gem_path
end end
end end
@ -81,8 +82,8 @@ module Rails
end end
def load_rubygems def load_rubygems
min_version = '1.3.2'
require 'rubygems' require 'rubygems'
min_version = '1.3.1'
unless rubygems_version >= min_version unless rubygems_version >= min_version
$stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.) $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
exit 1 exit 1

View File

@ -5,7 +5,7 @@
# ENV['RAILS_ENV'] ||= 'production' # ENV['RAILS_ENV'] ||= 'production'
# Specifies gem version of Rails to use when vendor/rails is not present # Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.2.2' unless defined? RAILS_GEM_VERSION RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION
# Bootstrap the Rails environment, frameworks, and default configuration # Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot') require File.join(File.dirname(__FILE__), 'boot')

View File

@ -33,7 +33,7 @@ module ActiveRecord
end end
else else
attr_name = @base.class.human_attribute_name(attr) attr_name = @base.class.human_attribute_name(attr)
full_messages << attr_name + ' ' + message full_messages << attr_name + ' ' + message.to_s
end end
end end
end end

View File

@ -0,0 +1,7 @@
# Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
# You can also remove all the silencers if you're trying do debug a problem that might steem from framework code.
# Rails.backtrace_cleaner.remove_silencers!

View File

@ -0,0 +1,10 @@
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
# end

View File

@ -60,6 +60,22 @@ bg:
one: "over 1 year" one: "over 1 year"
other: "over {{count}} years" other: "over {{count}} years"
number:
human:
format:
precision: 1
delimiter: ""
storage_units:
format: "%n %u"
units:
kb: KB
tb: TB
gb: GB
byte:
one: Byte
other: Bytes
mb: 'MB'
# Used in array.to_sentence. # Used in array.to_sentence.
support: support:
array: array:

View File

@ -83,9 +83,16 @@ bs:
format: format:
delimiter: "" delimiter: ""
precision: 1 precision: 1
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
# Used in array.to_sentence. # Used in array.to_sentence.
support: support:

View File

@ -60,6 +60,22 @@ ca:
one: "més d'un any" one: "més d'un any"
other: "més de {{count}} anys" other: "més de {{count}} anys"
number:
human:
format:
delimiter: ""
precision: 1
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
# Used in array.to_sentence. # Used in array.to_sentence.
support: support:
array: array:

View File

@ -60,6 +60,22 @@ cs:
one: "více než 1 rok" one: "více než 1 rok"
other: "více než {{count}} roky" other: "více než {{count}} roky"
number:
human:
format:
precision: 1
delimiter: ""
storage_units:
format: "%n %u"
units:
kb: KB
tb: TB
gb: GB
byte:
one: Byte
other: Bytes
mb: MB
# Used in array.to_sentence. # Used in array.to_sentence.
support: support:
array: array:

View File

@ -85,7 +85,16 @@ da:
# separator: # separator:
delimiter: "" delimiter: ""
precision: 1 precision: 1
storage_units: [Bytes, KB, MB, GB, TB] storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
percentage: percentage:
format: format:
# separator: # separator:

View File

@ -83,6 +83,16 @@ de:
format: format:
delimiter: "" delimiter: ""
precision: 1 precision: 1
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
support: support:
array: array:

View File

@ -63,6 +63,22 @@ el:
one: "πάνω από 1 χρόνο" one: "πάνω από 1 χρόνο"
other: "πάνω από {{count}} χρόνια" other: "πάνω από {{count}} χρόνια"
number:
human:
format:
precision: 1
delimiter: ""
storage_units:
format: "%n %u"
units:
kb: KB
tb: TB
gb: GB
byte:
one: Byte
other: Bytes
mb: MB
# Used in array.to_sentence. # Used in array.to_sentence.
support: support:
array: array:

View File

@ -60,6 +60,23 @@ en:
one: "over 1 year" one: "over 1 year"
other: "over {{count}} years" other: "over {{count}} years"
number:
human:
format:
delimiter: ""
precision: 1
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
# Used in array.to_sentence. # Used in array.to_sentence.
support: support:
array: array:

View File

@ -47,6 +47,16 @@ es:
# separator: # separator:
delimiter: "" delimiter: ""
precision: 1 precision: 1
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
# Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words() # Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
datetime: datetime:

View File

@ -61,7 +61,16 @@ fi:
format: format:
delimiter: "" delimiter: ""
precision: 1 precision: 1
storage_units: [Tavua, KB, MB, GB, TB] storage_units:
format: "%n %u"
units:
byte:
one: "Tavua"
other: "Tavua"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
datetime: datetime:
distance_in_words: distance_in_words:

View File

@ -84,7 +84,16 @@ fr:
human: human:
format: format:
precision: 2 precision: 2
storage_units: [ Octet, ko, Mo, Go, To ] storage_units:
format: "%n %u"
units:
byte:
one: "Octet"
other: "Octet"
kb: "ko"
mb: "Mo"
gb: "Go"
tb: "To"
support: support:
array: array:

View File

@ -33,6 +33,16 @@ gl:
# separator: # separator:
delimiter: "" delimiter: ""
precision: 1 precision: 1
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
date: date:

View File

@ -76,6 +76,17 @@ he:
unit: 'שח' unit: 'שח'
precision: 2 precision: 2
format: '%u %n' format: '%u %n'
human:
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
support: support:
array: array:

View File

@ -90,7 +90,16 @@
format: format:
delimiter: "" delimiter: ""
precision: 1 precision: 1
storage_units: [bájt, KB, MB, GB, TB] storage_units:
format: "%n %u"
units:
byte:
one: "bájt"
other: "bájt"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
support: support:
array: array:

View File

@ -74,6 +74,17 @@ it:
unit: '€' unit: '€'
precision: 2 precision: 2
format: '%n %u' format: '%n %u'
human:
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
support: support:
array: array:

View File

@ -96,6 +96,16 @@ ja:
format: format:
delimiter: "" delimiter: ""
precision: 1 precision: 1
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
activerecord: activerecord:
errors: errors:

View File

@ -116,7 +116,16 @@ ko:
# separator: # separator:
delimiter: "" delimiter: ""
precision: 1 precision: 1
storage_units: [Bytes, KB, MB, GB, TB] storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
# Used in array.to_sentence. # Used in array.to_sentence.
support: support:

View File

@ -28,7 +28,16 @@ lt:
format: format:
delimiter: "" delimiter: ""
precision: 1 precision: 1
storage_units: [baitai, KB, MB, GB, TB] storage_units:
format: "%n %u"
units:
byte:
one: "baitai"
other: "baitai"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
datetime: datetime:
distance_in_words: distance_in_words:

View File

@ -60,6 +60,22 @@ nl:
one: "over 1 jaar" one: "over 1 jaar"
other: "over {{count}} jaren" other: "over {{count}} jaren"
number:
human:
format:
precision: 1
delimiter: ""
storage_units:
format: "%n %u"
units:
kb: KB
tb: TB
gb: GB
byte:
one: Byte
other: Bytes
mb: MB
# Used in array.to_sentence. # Used in array.to_sentence.
support: support:
array: array:

View File

@ -67,6 +67,18 @@
format: format:
delimiter: "" delimiter: ""
precision: 4 precision: 4
human:
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
activerecord: activerecord:
errors: errors:
template: template:

View File

@ -21,7 +21,16 @@ pl:
format: format:
delimiter: "" delimiter: ""
precision: 1 precision: 1
storage_units: [B, KB, MB, GB, TB] storage_units:
format: "%n %u"
units:
byte:
one: "B"
other: "B"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
date: date:
formats: formats:

View File

@ -93,6 +93,16 @@ pt-BR:
format: format:
precision: 1 precision: 1
delimiter: '.' delimiter: '.'
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
support: support:
array: array:
sentence_connector: "e" sentence_connector: "e"

View File

@ -83,6 +83,16 @@ pt:
format: format:
precision: 1 precision: 1
delimiter: '' delimiter: ''
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
activerecord: activerecord:
errors: errors:

View File

@ -58,6 +58,22 @@ ro:
one: "peste un an" one: "peste un an"
other: "peste {{count}} ani" other: "peste {{count}} ani"
number:
human:
format:
precision: 1
delimiter: ""
storage_units:
format: "%n %u"
units:
kb: KB
tb: TB
gb: GB
byte:
one: Byte
other: Bytes
mb: MB
# Used in array.to_sentence. # Used in array.to_sentence.
support: support:
array: array:

View File

@ -60,6 +60,22 @@ sk:
one: "cez 1 rok" one: "cez 1 rok"
other: "cez {{count}} roky/ov" other: "cez {{count}} roky/ov"
number:
human:
format:
precision: 1
delimiter: ""
storage_units:
format: "%n %u"
units:
kb: KB
tb: TB
gb: GB
byte:
one: Byte
other: Bytes
mb: MB
# Used in array.to_sentence. # Used in array.to_sentence.
support: support:
array: array:

View File

@ -60,6 +60,22 @@ sl:
one: "over 1 year" one: "over 1 year"
other: "over {{count}} years" other: "over {{count}} years"
number:
human:
format:
precision: 1
delimiter: ""
storage_units:
format: "%n %u"
units:
kb: KB
tb: TB
gb: GB
byte:
one: Byte
other: Bytes
mb: MB
# Used in array.to_sentence. # Used in array.to_sentence.
support: support:
array: array:

View File

@ -81,6 +81,17 @@
unit: 'ДИН' unit: 'ДИН'
precision: 2 precision: 2
format: '%n %u' format: '%n %u'
human:
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
support: support:
array: array:

View File

@ -47,7 +47,16 @@ sv:
# separator: # separator:
delimiter: "" delimiter: ""
# precision: 1 # precision: 1
storage_units: [Byte, KB, MB, GB, TB] storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
# Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words() # Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
datetime: datetime:

View File

@ -60,6 +60,22 @@ th:
one: "over 1 year" one: "over 1 year"
other: "over {{count}} years" other: "over {{count}} years"
number:
human:
format:
precision: 1
delimiter: ""
storage_units:
format: "%n %u"
units:
kb: KB
tb: TB
gb: GB
byte:
one: Byte
other: Bytes
mb: MB
# Used in array.to_sentence. # Used in array.to_sentence.
support: support:
array: array:

View File

@ -92,6 +92,16 @@ tr:
delimiter: '.' delimiter: '.'
separator: ',' separator: ','
precision: 2 precision: 2
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
support: support:
array: array:

View File

@ -60,6 +60,22 @@ uk:
one: "over 1 year" one: "over 1 year"
other: "over {{count}} years" other: "over {{count}} years"
number:
human:
format:
precision: 1
delimiter: ""
storage_units:
format: "%n %u"
units:
kb: KB
tb: TB
gb: GB
byte:
one: Byte
other: Bytes
mb: MB
# Used in array.to_sentence. # Used in array.to_sentence.
support: support:
array: array:

View File

@ -49,7 +49,16 @@ vi:
# separator: # separator:
delimiter: "" delimiter: ""
precision: 1 precision: 1
storage_units: [Bytes, KB, MB, GB, TB] storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
# Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words() # Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
datetime: datetime:

View File

@ -86,8 +86,9 @@
precision: 1 precision: 1
# 儲存單位輸出格式. # 儲存單位輸出格式.
# %u 是儲存單位, %n 是數值 (預設值: 2 MB) # %u 是儲存單位, %n 是數值 (預設值: 2 MB)
format: "%n %u"
storage_units: storage_units:
format: "%n %u"
units:
byte: byte:
one: "位元組 (B)" one: "位元組 (B)"
other: "位元組 (B)" other: "位元組 (B)"

View File

@ -86,7 +86,16 @@ zh:
format: format:
delimiter: "" delimiter: ""
precision: 1 precision: 1
storage_units: [Bytes, KB, MB, GB, TB] storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
support: support:
array: array:

View File

@ -6,11 +6,6 @@ ActionController::Routing::Routes.draw do |map|
# map.connect 'products/:id', :controller => 'catalog', :action => 'view' # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
# Keep in mind you can assign values other than :controller and :action # Keep in mind you can assign values other than :controller and :action
# Allow Redmine plugins to map routes and potentially override them
Rails.plugins.each do |plugin|
map.from_plugin plugin.name.to_sym
end
map.home '', :controller => 'welcome' map.home '', :controller => 'welcome'
map.signin 'login', :controller => 'account', :action => 'login' map.signin 'login', :controller => 'account', :action => 'login'

View File

@ -43,7 +43,7 @@ class TabularFormBuilder < ActionView::Helpers::FormBuilder
return '' if options.delete(:no_label) return '' if options.delete(:no_label)
text = options[:label].is_a?(Symbol) ? l(options[:label]) : options[:label] text = options[:label].is_a?(Symbol) ? l(options[:label]) : options[:label]
text ||= l(("field_" + field.to_s.gsub(/\_id$/, "")).to_sym) text ||= l(("field_" + field.to_s.gsub(/\_id$/, "")).to_sym)
text << @template.content_tag("span", " *", :class => "required") if options.delete(:required) text += @template.content_tag("span", " *", :class => "required") if options.delete(:required)
@template.content_tag("label", text, @template.content_tag("label", text,
:class => (@object && @object.errors[field] ? "error" : nil), :class => (@object && @object.errors[field] ? "error" : nil),
:for => (@object_name.to_s + "_" + field.to_s)) :for => (@object_name.to_s + "_" + field.to_s))

View File

@ -21,7 +21,7 @@ require 'account_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class AccountController; def rescue_action(e) raise e end; end class AccountController; def rescue_action(e) raise e end; end
class AccountControllerTest < Test::Unit::TestCase class AccountControllerTest < ActionController::TestCase
fixtures :users, :roles fixtures :users, :roles
def setup def setup

View File

@ -21,7 +21,7 @@ require 'admin_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class AdminController; def rescue_action(e) raise e end; end class AdminController; def rescue_action(e) raise e end; end
class AdminControllerTest < Test::Unit::TestCase class AdminControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles fixtures :projects, :users, :roles
def setup def setup

View File

@ -16,12 +16,12 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.dirname(__FILE__) + '/../test_helper' require File.dirname(__FILE__) + '/../test_helper'
require 'application' require 'application_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class ApplicationController; def rescue_action(e) raise e end; end class ApplicationController; def rescue_action(e) raise e end; end
class ApplicationControllerTest < Test::Unit::TestCase class ApplicationControllerTest < ActionController::TestCase
include Redmine::I18n include Redmine::I18n
def setup def setup

View File

@ -22,7 +22,7 @@ require 'attachments_controller'
class AttachmentsController; def rescue_action(e) raise e end; end class AttachmentsController; def rescue_action(e) raise e end; end
class AttachmentsControllerTest < Test::Unit::TestCase class AttachmentsControllerTest < ActionController::TestCase
fixtures :users, :projects, :roles, :members, :member_roles, :enabled_modules, :issues, :trackers, :attachments, fixtures :users, :projects, :roles, :members, :member_roles, :enabled_modules, :issues, :trackers, :attachments,
:versions, :wiki_pages, :wikis, :documents :versions, :wiki_pages, :wikis, :documents

View File

@ -21,7 +21,7 @@ require 'boards_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class BoardsController; def rescue_action(e) raise e end; end class BoardsController; def rescue_action(e) raise e end; end
class BoardsControllerTest < Test::Unit::TestCase class BoardsControllerTest < ActionController::TestCase
fixtures :projects, :users, :members, :member_roles, :roles, :boards, :messages, :enabled_modules fixtures :projects, :users, :members, :member_roles, :roles, :boards, :messages, :enabled_modules
def setup def setup

View File

@ -21,7 +21,7 @@ require 'custom_fields_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class CustomFieldsController; def rescue_action(e) raise e end; end class CustomFieldsController; def rescue_action(e) raise e end; end
class CustomFieldsControllerTest < Test::Unit::TestCase class CustomFieldsControllerTest < ActionController::TestCase
fixtures :custom_fields, :trackers, :users fixtures :custom_fields, :trackers, :users
def setup def setup

View File

@ -21,7 +21,7 @@ require 'documents_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class DocumentsController; def rescue_action(e) raise e end; end class DocumentsController; def rescue_action(e) raise e end; end
class DocumentsControllerTest < Test::Unit::TestCase class DocumentsControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :documents, :enumerations fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :documents, :enumerations
def setup def setup

View File

@ -21,7 +21,7 @@ require 'enumerations_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class EnumerationsController; def rescue_action(e) raise e end; end class EnumerationsController; def rescue_action(e) raise e end; end
class EnumerationsControllerTest < Test::Unit::TestCase class EnumerationsControllerTest < ActionController::TestCase
fixtures :enumerations, :issues, :users fixtures :enumerations, :issues, :users
def setup def setup

View File

@ -21,7 +21,7 @@ require 'groups_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class GroupsController; def rescue_action(e) raise e end; end class GroupsController; def rescue_action(e) raise e end; end
class GroupsControllerTest < Test::Unit::TestCase class GroupsControllerTest < ActionController::TestCase
fixtures :projects, :users, :members, :member_roles fixtures :projects, :users, :members, :member_roles
def setup def setup

View File

@ -21,7 +21,7 @@ require 'issue_categories_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class IssueCategoriesController; def rescue_action(e) raise e end; end class IssueCategoriesController; def rescue_action(e) raise e end; end
class IssueCategoriesControllerTest < Test::Unit::TestCase class IssueCategoriesControllerTest < ActionController::TestCase
fixtures :projects, :users, :members, :member_roles, :roles, :enabled_modules, :issue_categories fixtures :projects, :users, :members, :member_roles, :roles, :enabled_modules, :issue_categories
def setup def setup

View File

@ -5,7 +5,7 @@ require 'issue_relations_controller'
class IssueRelationsController; def rescue_action(e) raise e end; end class IssueRelationsController; def rescue_action(e) raise e end; end
class IssueRelationsControllerTest < Test::Unit::TestCase class IssueRelationsControllerTest < ActionController::TestCase
fixtures :projects, fixtures :projects,
:users, :users,
:roles, :roles,

View File

@ -21,7 +21,7 @@ require 'issues_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class IssuesController; def rescue_action(e) raise e end; end class IssuesController; def rescue_action(e) raise e end; end
class IssuesControllerTest < Test::Unit::TestCase class IssuesControllerTest < ActionController::TestCase
fixtures :projects, fixtures :projects,
:users, :users,
:roles, :roles,
@ -42,7 +42,8 @@ class IssuesControllerTest < Test::Unit::TestCase
:custom_fields_trackers, :custom_fields_trackers,
:time_entries, :time_entries,
:journals, :journals,
:journal_details :journal_details,
:queries
def setup def setup
@controller = IssuesController.new @controller = IssuesController.new
@ -452,6 +453,7 @@ class IssuesControllerTest < Test::Unit::TestCase
def test_post_new def test_post_new
@request.session[:user_id] = 2 @request.session[:user_id] = 2
assert_difference 'Issue.count' do
post :new, :project_id => 1, post :new, :project_id => 1,
:issue => {:tracker_id => 3, :issue => {:tracker_id => 3,
:subject => 'This is the test_new issue', :subject => 'This is the test_new issue',
@ -459,7 +461,8 @@ class IssuesControllerTest < Test::Unit::TestCase
:priority_id => 5, :priority_id => 5,
:estimated_hours => '', :estimated_hours => '',
:custom_field_values => {'2' => 'Value for field 2'}} :custom_field_values => {'2' => 'Value for field 2'}}
assert_redirected_to :action => 'show' end
assert_redirected_to :controller => 'issues', :action => 'show', :id => Issue.last.id
issue = Issue.find_by_subject('This is the test_new issue') issue = Issue.find_by_subject('This is the test_new issue')
assert_not_nil issue assert_not_nil issue
@ -483,12 +486,14 @@ class IssuesControllerTest < Test::Unit::TestCase
def test_post_new_without_custom_fields_param def test_post_new_without_custom_fields_param
@request.session[:user_id] = 2 @request.session[:user_id] = 2
assert_difference 'Issue.count' do
post :new, :project_id => 1, post :new, :project_id => 1,
:issue => {:tracker_id => 1, :issue => {:tracker_id => 1,
:subject => 'This is the test_new issue', :subject => 'This is the test_new issue',
:description => 'This is the description', :description => 'This is the description',
:priority_id => 5} :priority_id => 5}
assert_redirected_to :action => 'show' end
assert_redirected_to :controller => 'issues', :action => 'show', :id => Issue.last.id
end end
def test_post_new_with_required_custom_field_and_without_custom_fields_param def test_post_new_with_required_custom_field_and_without_custom_fields_param
@ -536,6 +541,7 @@ class IssuesControllerTest < Test::Unit::TestCase
def test_post_new_should_send_a_notification def test_post_new_should_send_a_notification
ActionMailer::Base.deliveries.clear ActionMailer::Base.deliveries.clear
@request.session[:user_id] = 2 @request.session[:user_id] = 2
assert_difference 'Issue.count' do
post :new, :project_id => 1, post :new, :project_id => 1,
:issue => {:tracker_id => 3, :issue => {:tracker_id => 3,
:subject => 'This is the test_new issue', :subject => 'This is the test_new issue',
@ -543,7 +549,8 @@ class IssuesControllerTest < Test::Unit::TestCase
:priority_id => 5, :priority_id => 5,
:estimated_hours => '', :estimated_hours => '',
:custom_field_values => {'2' => 'Value for field 2'}} :custom_field_values => {'2' => 'Value for field 2'}}
assert_redirected_to :action => 'show' end
assert_redirected_to :controller => 'issues', :action => 'show', :id => Issue.last.id
assert_equal 1, ActionMailer::Base.deliveries.size assert_equal 1, ActionMailer::Base.deliveries.size
end end

View File

@ -21,7 +21,7 @@ require 'journals_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class JournalsController; def rescue_action(e) raise e end; end class JournalsController; def rescue_action(e) raise e end; end
class JournalsControllerTest < Test::Unit::TestCase class JournalsControllerTest < ActionController::TestCase
fixtures :projects, :users, :members, :member_roles, :roles, :issues, :journals, :journal_details, :enabled_modules fixtures :projects, :users, :members, :member_roles, :roles, :issues, :journals, :journal_details, :enabled_modules
def setup def setup

View File

@ -21,7 +21,7 @@ require 'mail_handler_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class MailHandlerController; def rescue_action(e) raise e end; end class MailHandlerController; def rescue_action(e) raise e end; end
class MailHandlerControllerTest < Test::Unit::TestCase class MailHandlerControllerTest < ActionController::TestCase
fixtures :users, :projects, :enabled_modules, :roles, :members, :member_roles, :issues, :issue_statuses, :trackers, :enumerations fixtures :users, :projects, :enabled_modules, :roles, :members, :member_roles, :issues, :issue_statuses, :trackers, :enumerations
FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures/mail_handler' FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures/mail_handler'

View File

@ -22,7 +22,7 @@ require 'members_controller'
class MembersController; def rescue_action(e) raise e end; end class MembersController; def rescue_action(e) raise e end; end
class MembersControllerTest < Test::Unit::TestCase class MembersControllerTest < ActionController::TestCase
fixtures :projects, :members, :member_roles, :roles, :users fixtures :projects, :members, :member_roles, :roles, :users
def setup def setup

View File

@ -21,7 +21,7 @@ require 'messages_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class MessagesController; def rescue_action(e) raise e end; end class MessagesController; def rescue_action(e) raise e end; end
class MessagesControllerTest < Test::Unit::TestCase class MessagesControllerTest < ActionController::TestCase
fixtures :projects, :users, :members, :member_roles, :roles, :boards, :messages, :enabled_modules fixtures :projects, :users, :members, :member_roles, :roles, :boards, :messages, :enabled_modules
def setup def setup

View File

@ -21,7 +21,7 @@ require 'my_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class MyController; def rescue_action(e) raise e end; end class MyController; def rescue_action(e) raise e end; end
class MyControllerTest < Test::Unit::TestCase class MyControllerTest < ActionController::TestCase
fixtures :users, :issues, :issue_statuses, :trackers, :enumerations, :custom_fields fixtures :users, :issues, :issue_statuses, :trackers, :enumerations, :custom_fields
def setup def setup

View File

@ -21,7 +21,7 @@ require 'news_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class NewsController; def rescue_action(e) raise e end; end class NewsController; def rescue_action(e) raise e end; end
class NewsControllerTest < Test::Unit::TestCase class NewsControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :news, :comments fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :news, :comments
def setup def setup

View File

@ -21,7 +21,7 @@ require 'projects_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class ProjectsController; def rescue_action(e) raise e end; end class ProjectsController; def rescue_action(e) raise e end; end
class ProjectsControllerTest < Test::Unit::TestCase class ProjectsControllerTest < ActionController::TestCase
fixtures :projects, :versions, :users, :roles, :members, :member_roles, :issues, :journals, :journal_details, fixtures :projects, :versions, :users, :roles, :members, :member_roles, :issues, :journals, :journal_details,
:trackers, :projects_trackers, :issue_statuses, :enabled_modules, :enumerations, :boards, :messages, :trackers, :projects_trackers, :issue_statuses, :enabled_modules, :enumerations, :boards, :messages,
:attachments :attachments

View File

@ -21,7 +21,7 @@ require 'queries_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class QueriesController; def rescue_action(e) raise e end; end class QueriesController; def rescue_action(e) raise e end; end
class QueriesControllerTest < Test::Unit::TestCase class QueriesControllerTest < ActionController::TestCase
fixtures :projects, :users, :members, :member_roles, :roles, :trackers, :issue_statuses, :issue_categories, :enumerations, :issues, :custom_fields, :custom_values, :queries fixtures :projects, :users, :members, :member_roles, :roles, :trackers, :issue_statuses, :issue_categories, :enumerations, :issues, :custom_fields, :custom_values, :queries
def setup def setup
@ -70,7 +70,7 @@ class QueriesControllerTest < Test::Unit::TestCase
:query => {"name" => "test_new_project_public_query", "is_public" => "1"} :query => {"name" => "test_new_project_public_query", "is_public" => "1"}
q = Query.find_by_name('test_new_project_public_query') q = Query.find_by_name('test_new_project_public_query')
assert_redirected_to :controller => 'issues', :action => 'index', :query_id => q assert_redirected_to :controller => 'issues', :action => 'index', :project_id => 'ecookbook', :query_id => q
assert q.is_public? assert q.is_public?
assert q.has_default_columns? assert q.has_default_columns?
assert q.valid? assert q.valid?
@ -88,7 +88,7 @@ class QueriesControllerTest < Test::Unit::TestCase
:query => {"name" => "test_new_project_private_query", "is_public" => "1"} :query => {"name" => "test_new_project_private_query", "is_public" => "1"}
q = Query.find_by_name('test_new_project_private_query') q = Query.find_by_name('test_new_project_private_query')
assert_redirected_to :controller => 'issues', :action => 'index', :query_id => q assert_redirected_to :controller => 'issues', :action => 'index', :project_id => 'ecookbook', :query_id => q
assert !q.is_public? assert !q.is_public?
assert q.has_default_columns? assert q.has_default_columns?
assert q.valid? assert q.valid?
@ -104,7 +104,7 @@ class QueriesControllerTest < Test::Unit::TestCase
:query => {"name" => "test_new_global_private_query", "is_public" => "1", "column_names" => ["", "tracker", "subject", "priority", "category"]} :query => {"name" => "test_new_global_private_query", "is_public" => "1", "column_names" => ["", "tracker", "subject", "priority", "category"]}
q = Query.find_by_name('test_new_global_private_query') q = Query.find_by_name('test_new_global_private_query')
assert_redirected_to :controller => 'issues', :action => 'index', :query_id => q assert_redirected_to :controller => 'issues', :action => 'index', :project_id => nil, :query_id => q
assert !q.is_public? assert !q.is_public?
assert !q.has_default_columns? assert !q.has_default_columns?
assert_equal [:tracker, :subject, :priority, :category], q.columns.collect {|c| c.name} assert_equal [:tracker, :subject, :priority, :category], q.columns.collect {|c| c.name}

View File

@ -22,7 +22,7 @@ require 'reports_controller'
class ReportsController; def rescue_action(e) raise e end; end class ReportsController; def rescue_action(e) raise e end; end
class ReportsControllerTest < Test::Unit::TestCase class ReportsControllerTest < ActionController::TestCase
fixtures :all fixtures :all
def setup def setup

View File

@ -21,7 +21,7 @@ require 'repositories_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class RepositoriesController; def rescue_action(e) raise e end; end class RepositoriesController; def rescue_action(e) raise e end; end
class RepositoriesBazaarControllerTest < Test::Unit::TestCase class RepositoriesBazaarControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :repositories, :enabled_modules fixtures :projects, :users, :roles, :members, :member_roles, :repositories, :enabled_modules
# No '..' in the repository path # No '..' in the repository path

View File

@ -21,7 +21,7 @@ require 'repositories_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class RepositoriesController; def rescue_action(e) raise e end; end class RepositoriesController; def rescue_action(e) raise e end; end
class RepositoriesControllerTest < Test::Unit::TestCase class RepositoriesControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :repositories, :issues, :issue_statuses, :changesets, :changes, :issue_categories, :enumerations, :custom_fields, :custom_values, :trackers fixtures :projects, :users, :roles, :members, :member_roles, :repositories, :issues, :issue_statuses, :changesets, :changes, :issue_categories, :enumerations, :custom_fields, :custom_values, :trackers
def setup def setup

View File

@ -21,7 +21,7 @@ require 'repositories_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class RepositoriesController; def rescue_action(e) raise e end; end class RepositoriesController; def rescue_action(e) raise e end; end
class RepositoriesCvsControllerTest < Test::Unit::TestCase class RepositoriesCvsControllerTest < ActionController::TestCase
# No '..' in the repository path # No '..' in the repository path
REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/cvs_repository' REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/cvs_repository'

View File

@ -21,7 +21,7 @@ require 'repositories_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class RepositoriesController; def rescue_action(e) raise e end; end class RepositoriesController; def rescue_action(e) raise e end; end
class RepositoriesDarcsControllerTest < Test::Unit::TestCase class RepositoriesDarcsControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :repositories, :enabled_modules fixtures :projects, :users, :roles, :members, :member_roles, :repositories, :enabled_modules
# No '..' in the repository path # No '..' in the repository path

View File

@ -21,7 +21,7 @@ require 'repositories_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class RepositoriesController; def rescue_action(e) raise e end; end class RepositoriesController; def rescue_action(e) raise e end; end
class RepositoriesGitControllerTest < Test::Unit::TestCase class RepositoriesGitControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :repositories, :enabled_modules fixtures :projects, :users, :roles, :members, :member_roles, :repositories, :enabled_modules
# No '..' in the repository path # No '..' in the repository path

View File

@ -21,7 +21,7 @@ require 'repositories_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class RepositoriesController; def rescue_action(e) raise e end; end class RepositoriesController; def rescue_action(e) raise e end; end
class RepositoriesMercurialControllerTest < Test::Unit::TestCase class RepositoriesMercurialControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :repositories, :enabled_modules fixtures :projects, :users, :roles, :members, :member_roles, :repositories, :enabled_modules
# No '..' in the repository path # No '..' in the repository path

View File

@ -21,7 +21,7 @@ require 'repositories_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class RepositoriesController; def rescue_action(e) raise e end; end class RepositoriesController; def rescue_action(e) raise e end; end
class RepositoriesSubversionControllerTest < Test::Unit::TestCase class RepositoriesSubversionControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules,
:repositories, :issues, :issue_statuses, :changesets, :changes, :repositories, :issues, :issue_statuses, :changesets, :changes,
:issue_categories, :enumerations, :custom_fields, :custom_values, :trackers :issue_categories, :enumerations, :custom_fields, :custom_values, :trackers

View File

@ -21,7 +21,7 @@ require 'roles_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class RolesController; def rescue_action(e) raise e end; end class RolesController; def rescue_action(e) raise e end; end
class RolesControllerTest < Test::Unit::TestCase class RolesControllerTest < ActionController::TestCase
fixtures :roles, :users, :members, :member_roles, :workflows fixtures :roles, :users, :members, :member_roles, :workflows
def setup def setup

View File

@ -4,7 +4,7 @@ require 'search_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class SearchController; def rescue_action(e) raise e end; end class SearchController; def rescue_action(e) raise e end; end
class SearchControllerTest < Test::Unit::TestCase class SearchControllerTest < ActionController::TestCase
fixtures :projects, :enabled_modules, :roles, :users, :members, :member_roles, fixtures :projects, :enabled_modules, :roles, :users, :members, :member_roles,
:issues, :trackers, :issue_statuses, :issues, :trackers, :issue_statuses,
:custom_fields, :custom_values, :custom_fields, :custom_values,

View File

@ -21,7 +21,7 @@ require 'settings_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class SettingsController; def rescue_action(e) raise e end; end class SettingsController; def rescue_action(e) raise e end; end
class SettingsControllerTest < Test::Unit::TestCase class SettingsControllerTest < ActionController::TestCase
fixtures :users fixtures :users
def setup def setup

View File

@ -21,7 +21,7 @@ require 'sys_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class SysController; def rescue_action(e) raise e end; end class SysController; def rescue_action(e) raise e end; end
class SysControllerTest < Test::Unit::TestCase class SysControllerTest < ActionController::TestCase
fixtures :projects, :repositories fixtures :projects, :repositories
def setup def setup

View File

@ -21,7 +21,7 @@ require 'timelog_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class TimelogController; def rescue_action(e) raise e end; end class TimelogController; def rescue_action(e) raise e end; end
class TimelogControllerTest < Test::Unit::TestCase class TimelogControllerTest < ActionController::TestCase
fixtures :projects, :enabled_modules, :roles, :members, :member_roles, :issues, :time_entries, :users, :trackers, :enumerations, :issue_statuses, :custom_fields, :custom_values fixtures :projects, :enabled_modules, :roles, :members, :member_roles, :issues, :time_entries, :users, :trackers, :enumerations, :issue_statuses, :custom_fields, :custom_values
def setup def setup

View File

@ -21,7 +21,7 @@ require 'trackers_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class TrackersController; def rescue_action(e) raise e end; end class TrackersController; def rescue_action(e) raise e end; end
class TrackersControllerTest < Test::Unit::TestCase class TrackersControllerTest < ActionController::TestCase
fixtures :trackers, :projects, :projects_trackers, :users, :issues fixtures :trackers, :projects, :projects_trackers, :users, :issues
def setup def setup

View File

@ -21,7 +21,7 @@ require 'users_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class UsersController; def rescue_action(e) raise e end; end class UsersController; def rescue_action(e) raise e end; end
class UsersControllerTest < Test::Unit::TestCase class UsersControllerTest < ActionController::TestCase
include Redmine::I18n include Redmine::I18n
fixtures :users, :projects, :members, :member_roles, :roles fixtures :users, :projects, :members, :member_roles, :roles

View File

@ -21,7 +21,7 @@ require 'versions_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class VersionsController; def rescue_action(e) raise e end; end class VersionsController; def rescue_action(e) raise e end; end
class VersionsControllerTest < Test::Unit::TestCase class VersionsControllerTest < ActionController::TestCase
fixtures :projects, :versions, :issues, :users, :roles, :members, :member_roles, :enabled_modules fixtures :projects, :versions, :issues, :users, :roles, :members, :member_roles, :enabled_modules
def setup def setup

View File

@ -21,7 +21,7 @@ require 'watchers_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class WatchersController; def rescue_action(e) raise e end; end class WatchersController; def rescue_action(e) raise e end; end
class WatchersControllerTest < Test::Unit::TestCase class WatchersControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules,
:issues, :trackers, :projects_trackers, :issue_statuses, :enumerations, :watchers :issues, :trackers, :projects_trackers, :issue_statuses, :enumerations, :watchers

View File

@ -21,7 +21,7 @@ require 'welcome_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class WelcomeController; def rescue_action(e) raise e end; end class WelcomeController; def rescue_action(e) raise e end; end
class WelcomeControllerTest < Test::Unit::TestCase class WelcomeControllerTest < ActionController::TestCase
fixtures :projects, :news fixtures :projects, :news
def setup def setup

View File

@ -21,7 +21,7 @@ require 'wiki_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class WikiController; def rescue_action(e) raise e end; end class WikiController; def rescue_action(e) raise e end; end
class WikiControllerTest < Test::Unit::TestCase class WikiControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :wikis, :wiki_pages, :wiki_contents, :wiki_content_versions, :attachments fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :wikis, :wiki_pages, :wiki_contents, :wiki_content_versions, :attachments
def setup def setup

View File

@ -21,7 +21,7 @@ require 'wikis_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class WikisController; def rescue_action(e) raise e end; end class WikisController; def rescue_action(e) raise e end; end
class WikisControllerTest < Test::Unit::TestCase class WikisControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :wikis fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :wikis
def setup def setup

View File

@ -21,7 +21,7 @@ require 'workflows_controller'
# Re-raise errors caught by the controller. # Re-raise errors caught by the controller.
class WorkflowsController; def rescue_action(e) raise e end; end class WorkflowsController; def rescue_action(e) raise e end; end
class WorkflowsControllerTest < Test::Unit::TestCase class WorkflowsControllerTest < ActionController::TestCase
fixtures :roles, :trackers, :workflows fixtures :roles, :trackers, :workflows
def setup def setup

View File

@ -4,7 +4,7 @@ class StubController < ApplicationController
attr_accessor :request, :url attr_accessor :request, :url
end end
class HelperTestCase < Test::Unit::TestCase class HelperTestCase < ActiveSupport::TestCase
# Add other helpers here if you need them # Add other helpers here if you need them
include ActionView::Helpers::ActiveRecordHelper include ActionView::Helpers::ActiveRecordHelper

View File

@ -21,7 +21,7 @@ require 'test_help'
require File.expand_path(File.dirname(__FILE__) + '/helper_testcase') require File.expand_path(File.dirname(__FILE__) + '/helper_testcase')
require File.join(RAILS_ROOT,'test', 'mocks', 'open_id_authentication_mock.rb') require File.join(RAILS_ROOT,'test', 'mocks', 'open_id_authentication_mock.rb')
class Test::Unit::TestCase class ActiveSupport::TestCase
# Transactional fixtures accelerate your tests by wrapping each test method # Transactional fixtures accelerate your tests by wrapping each test method
# in a transaction that's rolled back on completion. This ensures that the # in a transaction that's rolled back on completion. This ensures that the
# test database remains unchanged so your fixtures don't have to be reloaded # test database remains unchanged so your fixtures don't have to be reloaded
@ -55,7 +55,7 @@ class Test::Unit::TestCase
end end
def test_uploaded_file(name, mime) def test_uploaded_file(name, mime)
ActionController::TestUploadedFile.new(Test::Unit::TestCase.fixture_path + "/files/#{name}", mime) ActionController::TestUploadedFile.new(ActiveSupport::TestCase.fixture_path + "/files/#{name}", mime)
end end
# Use a temporary directory for attachment related tests # Use a temporary directory for attachment related tests

View File

@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper' require File.dirname(__FILE__) + '/../test_helper'
class ActivityTest < Test::Unit::TestCase class ActivityTest < ActiveSupport::TestCase
fixtures :projects, :versions, :attachments, :users, :roles, :members, :member_roles, :issues, :journals, :journal_details, fixtures :projects, :versions, :attachments, :users, :roles, :members, :member_roles, :issues, :journals, :journal_details,
:trackers, :projects_trackers, :issue_statuses, :enabled_modules, :enumerations, :boards, :messages :trackers, :projects_trackers, :issue_statuses, :enabled_modules, :enumerations, :boards, :messages

View File

@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper' require File.dirname(__FILE__) + '/../test_helper'
class AttachmentTest < Test::Unit::TestCase class AttachmentTest < ActiveSupport::TestCase
fixtures :issues, :users fixtures :issues, :users
def setup def setup

View File

@ -17,7 +17,7 @@
require File.dirname(__FILE__) + '/../test_helper' require File.dirname(__FILE__) + '/../test_helper'
class AuthSourceLdapTest < Test::Unit::TestCase class AuthSourceLdapTest < ActiveSupport::TestCase
def setup def setup
end end

View File

@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/../test_helper' require File.dirname(__FILE__) + '/../test_helper'
class BoardTest < Test::Unit::TestCase class BoardTest < ActiveSupport::TestCase
fixtures :projects, :boards, :messages fixtures :projects, :boards, :messages
def setup def setup

Some files were not shown because too many files have changed in this diff Show More