summaryrefslogtreecommitdiffstats
path: root/test/functional/issues_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-29 20:56:33 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-29 20:56:33 +0000
commite7d48427d6ff117c09859751e08e577ab0c1871d (patch)
tree187c609d1a91814b4b823ef4da338b937f0b30a8 /test/functional/issues_controller_test.rb
parent1e7c4488b9335aa7747d90e8841afec0140eb410 (diff)
downloadredmine-e7d48427d6ff117c09859751e08e577ab0c1871d.tar.gz
redmine-e7d48427d6ff117c09859751e08e577ab0c1871d.zip
Adds functional tests on issue list content formatting.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7991 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/issues_controller_test.rb')
-rw-r--r--test/functional/issues_controller_test.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 19f01554b..3a2ce90cc 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -596,6 +596,31 @@ class IssuesControllerTest < ActionController::TestCase
:ancestor => {:tag => 'table', :attributes => {:class => /issues/}}
end
+ def test_index_with_date_column
+ Issue.find(1).update_attribute :start_date, '1987-08-24'
+
+ with_settings :date_format => '%d/%m/%Y' do
+ get :index, :set_filter => 1, :c => %w(start_date)
+ assert_tag 'td', :attributes => {:class => /start_date/}, :content => '24/08/1987'
+ end
+ end
+
+ def test_index_with_done_ratio
+ Issue.find(1).update_attribute :done_ratio, 40
+
+ get :index, :set_filter => 1, :c => %w(done_ratio)
+ assert_tag 'td', :attributes => {:class => /done_ratio/},
+ :child => {:tag => 'table', :attributes => {:class => 'progress'},
+ :descendant => {:tag => 'td', :attributes => {:class => 'closed', :style => 'width: 40%;'}}
+ }
+ end
+
+ def test_index_with_fixed_version
+ get :index, :set_filter => 1, :c => %w(fixed_version)
+ assert_tag 'td', :attributes => {:class => /fixed_version/},
+ :child => {:tag => 'a', :content => '1.0', :attributes => {:href => '/versions/2'}}
+ end
+
def test_index_send_html_if_query_is_invalid
get :index, :f => ['start_date'], :op => {:start_date => '='}
assert_equal 'text/html', @response.content_type