##// END OF EJS Templates
Fixes section edit links when text includes pre/code tag (#2222)....
Fixes section edit links when text includes pre/code tag (#2222). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7835 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r6704:44ae210ea0a4
r7715:b3b2eb3e50c5
Show More
application_controller_test.rb
100 lines | 3.3 KiB | text/x-ruby | RubyLexer
/ test / functional / application_controller_test.rb
Toshi MARUYAMA
remove trailing white-spaces from test/functional/application_controller_test.rb....
r6704 # Redmine - project management software
# Copyright (C) 2006-2011 Jean-Philippe Lang
Jean-Philippe Lang
added lang files validition test...
r211 #
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
Toshi MARUYAMA
remove trailing white-spaces from test/functional/application_controller_test.rb....
r6704 #
Jean-Philippe Lang
added lang files validition test...
r211 # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
Toshi MARUYAMA
remove trailing white-spaces from test/functional/application_controller_test.rb....
r6704 #
Jean-Philippe Lang
added lang files validition test...
r211 # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Jean-Baptiste Barth
Use absolute paths in test/**/* requires for Ruby 1.9.2 compatibility. #4050...
r4395 require File.expand_path('../../test_helper', __FILE__)
Eric Davis
Upgraded to Rails 2.3.4 (#3597)...
r2773 require 'application_controller'
Jean-Philippe Lang
added lang files validition test...
r211
Eric Davis
Upgraded to Rails 2.3.4 (#3597)...
r2773 class ApplicationControllerTest < ActionController::TestCase
Jean-Philippe Lang
Merged Rails 2.2 branch. Redmine now requires Rails 2.2.2....
r2430 include Redmine::I18n
Toshi MARUYAMA
remove trailing white-spaces from test/functional/application_controller_test.rb....
r6704
Jean-Philippe Lang
added lang files validition test...
r211 def setup
@controller = ApplicationController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
end
Jean-Philippe Lang
Dutch translation added (Linda van den Brink)...
r536 # check that all language files are valid
Jean-Philippe Lang
added lang files validition test...
r211 def test_localization
Toshi MARUYAMA
replace RAILS_ROOT to Rails.root if functional application controller test....
r5955 lang_files_count = Dir["#{Rails.root}/config/locales/*.yml"].size
Jean-Philippe Lang
Merged Rails 2.2 branch. Redmine now requires Rails 2.2.2....
r2430 assert_equal lang_files_count, valid_languages.size
valid_languages.each do |lang|
Jean-Philippe Lang
added lang files validition test...
r211 assert set_language_if_valid(lang)
end
Jean-Philippe Lang
Fixed: CVS repository doesn't work if port is used in the url (#653)....
r1142 set_language_if_valid('en')
Jean-Philippe Lang
added lang files validition test...
r211 end
Toshi MARUYAMA
remove trailing white-spaces from test/functional/application_controller_test.rb....
r6704
Eric Davis
Included Redmine::Hook::Helper to ActionController::Base so call_hook...
r1977 def test_call_hook_mixed_in
assert @controller.respond_to?(:call_hook)
end
Toshi MARUYAMA
remove trailing white-spaces from test/functional/application_controller_test.rb....
r6704
Jean-Philippe Lang
Makes API accept offset/limit or page/limit parameters for retrieving collections....
r4457 context "test_api_offset_and_limit" do
context "without params" do
should "return 0, 25" do
assert_equal [0, 25], @controller.api_offset_and_limit({})
end
end
Toshi MARUYAMA
remove trailing white-spaces from test/functional/application_controller_test.rb....
r6704
Jean-Philippe Lang
Makes API accept offset/limit or page/limit parameters for retrieving collections....
r4457 context "with limit" do
should "return 0, limit" do
assert_equal [0, 30], @controller.api_offset_and_limit({:limit => 30})
end
Toshi MARUYAMA
remove trailing white-spaces from test/functional/application_controller_test.rb....
r6704
Jean-Philippe Lang
Makes API accept offset/limit or page/limit parameters for retrieving collections....
r4457 should "not exceed 100" do
assert_equal [0, 100], @controller.api_offset_and_limit({:limit => 120})
end
should "not be negative" do
assert_equal [0, 25], @controller.api_offset_and_limit({:limit => -10})
end
end
Toshi MARUYAMA
remove trailing white-spaces from test/functional/application_controller_test.rb....
r6704
Jean-Philippe Lang
Makes API accept offset/limit or page/limit parameters for retrieving collections....
r4457 context "with offset" do
should "return offset, 25" do
assert_equal [10, 25], @controller.api_offset_and_limit({:offset => 10})
end
should "not be negative" do
assert_equal [0, 25], @controller.api_offset_and_limit({:offset => -10})
end
Toshi MARUYAMA
remove trailing white-spaces from test/functional/application_controller_test.rb....
r6704
Jean-Philippe Lang
Makes API accept offset/limit or page/limit parameters for retrieving collections....
r4457 context "and limit" do
should "return offset, limit" do
assert_equal [10, 50], @controller.api_offset_and_limit({:offset => 10, :limit => 50})
end
end
end
Toshi MARUYAMA
remove trailing white-spaces from test/functional/application_controller_test.rb....
r6704
Jean-Philippe Lang
Makes API accept offset/limit or page/limit parameters for retrieving collections....
r4457 context "with page" do
should "return offset, 25" do
assert_equal [0, 25], @controller.api_offset_and_limit({:page => 1})
assert_equal [50, 25], @controller.api_offset_and_limit({:page => 3})
end
should "not be negative" do
assert_equal [0, 25], @controller.api_offset_and_limit({:page => 0})
assert_equal [0, 25], @controller.api_offset_and_limit({:page => -2})
end
Toshi MARUYAMA
remove trailing white-spaces from test/functional/application_controller_test.rb....
r6704
Jean-Philippe Lang
Makes API accept offset/limit or page/limit parameters for retrieving collections....
r4457 context "and limit" do
should "return offset, limit" do
assert_equal [0, 100], @controller.api_offset_and_limit({:page => 1, :limit => 100})
assert_equal [200, 100], @controller.api_offset_and_limit({:page => 3, :limit => 100})
end
end
end
end
Jean-Philippe Lang
added lang files validition test...
r211 end