##// END OF EJS Templates
Adds functional tests on issue list content formatting....
Jean-Philippe Lang -
r7871:e7d48427d6ff
parent child
Show More
@@ -596,6 +596,31 class IssuesControllerTest < ActionController::TestCase
596 :ancestor => {:tag => 'table', :attributes => {:class => /issues/}}
596 :ancestor => {:tag => 'table', :attributes => {:class => /issues/}}
597 end
597 end
598
598
599 def test_index_with_date_column
600 Issue.find(1).update_attribute :start_date, '1987-08-24'
601
602 with_settings :date_format => '%d/%m/%Y' do
603 get :index, :set_filter => 1, :c => %w(start_date)
604 assert_tag 'td', :attributes => {:class => /start_date/}, :content => '24/08/1987'
605 end
606 end
607
608 def test_index_with_done_ratio
609 Issue.find(1).update_attribute :done_ratio, 40
610
611 get :index, :set_filter => 1, :c => %w(done_ratio)
612 assert_tag 'td', :attributes => {:class => /done_ratio/},
613 :child => {:tag => 'table', :attributes => {:class => 'progress'},
614 :descendant => {:tag => 'td', :attributes => {:class => 'closed', :style => 'width: 40%;'}}
615 }
616 end
617
618 def test_index_with_fixed_version
619 get :index, :set_filter => 1, :c => %w(fixed_version)
620 assert_tag 'td', :attributes => {:class => /fixed_version/},
621 :child => {:tag => 'a', :content => '1.0', :attributes => {:href => '/versions/2'}}
622 end
623
599 def test_index_send_html_if_query_is_invalid
624 def test_index_send_html_if_query_is_invalid
600 get :index, :f => ['start_date'], :op => {:start_date => '='}
625 get :index, :f => ['start_date'], :op => {:start_date => '='}
601 assert_equal 'text/html', @response.content_type
626 assert_equal 'text/html', @response.content_type
General Comments 0
You need to be logged in to leave comments. Login now