"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/functional/timelog_report_test.rb" between
redmine-4.0.3.tar.gz and redmine-4.0.4.tar.gz

About: Redmine is a flexible project management and bug-tracking web application (using the Ruby on Rails framework). It supports also project wikis and forums, documents management, and multiple version control systems.

timelog_report_test.rb  (redmine-4.0.3):timelog_report_test.rb  (redmine-4.0.4)
skipping to change at line 235 skipping to change at line 235
def test_report_all_projects_csv_export def test_report_all_projects_csv_export
get :report, :params => { get :report, :params => {
:columns => 'month', :columns => 'month',
:from => "2007-01-01", :from => "2007-01-01",
:to => "2007-06-30", :to => "2007-06-30",
:criteria => ["project", "user", "activity"], :criteria => ["project", "user", "activity"],
:format => "csv" :format => "csv"
} }
assert_response :success assert_response :success
assert_equal 'text/csv; header=present', @response.content_type assert_equal 'text/csv', @response.content_type
lines = @response.body.chomp.split("\n") lines = @response.body.chomp.split("\n")
# Headers # Headers
assert_equal 'Project,User,Activity,2007-3,2007-4,Total time', lines.first assert_equal 'Project,User,Activity,2007-3,2007-4,Total time', lines.first
# Total row # Total row
assert_equal 'Total time,"","",154.25,8.65,162.90', lines.last assert_equal 'Total time,"","",154.25,8.65,162.90', lines.last
end end
def test_report_csv_export def test_report_csv_export
get :report, :params => { get :report, :params => {
:project_id => 1, :project_id => 1,
:columns => 'month', :columns => 'month',
:from => "2007-01-01", :from => "2007-01-01",
:to => "2007-06-30", :to => "2007-06-30",
:criteria => ["project", "user", "activity"], :criteria => ["project", "user", "activity"],
:format => "csv" :format => "csv"
} }
assert_response :success assert_response :success
assert_equal 'text/csv; header=present', @response.content_type assert_equal 'text/csv', @response.content_type
lines = @response.body.chomp.split("\n") lines = @response.body.chomp.split("\n")
# Headers # Headers
assert_equal 'Project,User,Activity,2007-3,2007-4,Total time', lines.first assert_equal 'Project,User,Activity,2007-3,2007-4,Total time', lines.first
# Total row # Total row
assert_equal 'Total time,"","",154.25,8.65,162.90', lines.last assert_equal 'Total time,"","",154.25,8.65,162.90', lines.last
end end
def test_csv_big_5 def test_csv_big_5
str_utf8 = "\xe4\xb8\x80\xe6\x9c\x88".force_encoding('UTF-8') str_utf8 = "\xe4\xb8\x80\xe6\x9c\x88".force_encoding('UTF-8')
str_big5 = "\xa4@\xa4\xeb".force_encoding('Big5') str_big5 = "\xa4@\xa4\xeb".force_encoding('Big5')
skipping to change at line 292 skipping to change at line 292
get :report, :params => { get :report, :params => {
:project_id => 1, :project_id => 1,
:columns => 'day', :columns => 'day',
:from => "2011-11-11", :from => "2011-11-11",
:to => "2011-11-11", :to => "2011-11-11",
:criteria => ["user"], :criteria => ["user"],
:format => "csv" :format => "csv"
} }
end end
assert_response :success assert_response :success
assert_equal 'text/csv; header=present', @response.content_type assert_equal 'text/csv', @response.content_type
lines = @response.body.chomp.split("\n") lines = @response.body.chomp.split("\n")
# Headers # Headers
s1 = "\xa5\xce\xa4\xe1,2011-11-11,\xa4u\xae\xc9\xc1`\xadp".force_encoding('B ig5') s1 = "\xa5\xce\xa4\xe1,2011-11-11,\xa4u\xae\xc9\xc1`\xadp".force_encoding('B ig5')
s2 = "\xa4u\xae\xc9\xc1`\xadp".force_encoding('Big5') s2 = "\xa4u\xae\xc9\xc1`\xadp".force_encoding('Big5')
assert_equal s1, lines.first assert_equal s1, lines.first
# Total row # Total row
assert_equal "#{str_big5} #{user.lastname},7.30,7.30", lines[1] assert_equal "#{str_big5} #{user.lastname},7.30,7.30", lines[1]
assert_equal "#{s2},7.30,7.30", lines[2] assert_equal "#{s2},7.30,7.30", lines[2]
str_tw = "Chinese/Traditional (\xe7\xb9\x81\xe9\xab\x94\xe4\xb8\xad\xe6\x96\ x87)".force_encoding('UTF-8') str_tw = "Chinese/Traditional (\xe7\xb9\x81\xe9\xab\x94\xe4\xb8\xad\xe6\x96\ x87)".force_encoding('UTF-8')
skipping to change at line 339 skipping to change at line 339
get :report, :params => { get :report, :params => {
:project_id => 1, :project_id => 1,
:columns => 'day', :columns => 'day',
:from => "2011-11-11", :from => "2011-11-11",
:to => "2011-11-11", :to => "2011-11-11",
:criteria => ["user"], :criteria => ["user"],
:format => "csv" :format => "csv"
} }
end end
assert_response :success assert_response :success
assert_equal 'text/csv; header=present', @response.content_type assert_equal 'text/csv', @response.content_type
lines = @response.body.chomp.split("\n") lines = @response.body.chomp.split("\n")
# Headers # Headers
s1 = "\xa5\xce\xa4\xe1,2011-11-11,\xa4u\xae\xc9\xc1`\xadp".force_encoding('B ig5') s1 = "\xa5\xce\xa4\xe1,2011-11-11,\xa4u\xae\xc9\xc1`\xadp".force_encoding('B ig5')
assert_equal s1, lines.first assert_equal s1, lines.first
# Total row # Total row
s2 = "\xa5H?".force_encoding('Big5') s2 = "\xa5H?".force_encoding('Big5')
assert_equal "#{s2} #{user.lastname},7.30,7.30", lines[1] assert_equal "#{s2} #{user.lastname},7.30,7.30", lines[1]
end end
def test_csv_fr def test_csv_fr
skipping to change at line 374 skipping to change at line 374
get :report, :params => { get :report, :params => {
:project_id => 1, :project_id => 1,
:columns => 'day', :columns => 'day',
:from => "2011-11-11", :from => "2011-11-11",
:to => "2011-11-11", :to => "2011-11-11",
:criteria => ["user"], :criteria => ["user"],
:format => "csv" :format => "csv"
} }
assert_response :success assert_response :success
assert_equal 'text/csv; header=present', @response.content_type assert_equal 'text/csv', @response.content_type
lines = @response.body.chomp.split("\n") lines = @response.body.chomp.split("\n")
# Headers # Headers
s1 = "Utilisateur;2011-11-11;Temps total".force_encoding('ISO-8859-1') s1 = "Utilisateur;2011-11-11;Temps total".force_encoding('ISO-8859-1')
s2 = "Temps total".force_encoding('ISO-8859-1') s2 = "Temps total".force_encoding('ISO-8859-1')
assert_equal s1, lines.first assert_equal s1, lines.first
# Total row # Total row
assert_equal "#{user.firstname} #{user.lastname};7,30;7,30", lines[1] assert_equal "#{user.firstname} #{user.lastname};7,30;7,30", lines[1]
assert_equal "#{s2};7,30;7,30", lines[2] assert_equal "#{s2};7,30;7,30", lines[2]
str_fr = "French (Fran\xc3\xa7ais)".force_encoding('UTF-8') str_fr = "French (Fran\xc3\xa7ais)".force_encoding('UTF-8')
 End of changes. 5 change blocks. 
5 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)