"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/functional/issues_controller_test.rb" between
redmine-4.1.0.tar.gz and redmine-4.1.1.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.

issues_controller_test.rb  (redmine-4.1.0):issues_controller_test.rb  (redmine-4.1.1)
skipping to change at line 664 skipping to change at line 664
end end
get :index, :params => { get :index, :params => {
:project_id => 1, :project_id => 1,
:set_filter => "1", :set_filter => "1",
:f => [''] :f => ['']
} }
assert_select '#csv-export-form input[name=?][value=?]', 'f[]', '' assert_select '#csv-export-form input[name=?][value=?]', 'f[]', ''
end end
def test_index_should_show_block_columns_in_csv_export_form
field = IssueCustomField.
create!(
:name => 'Long text', :field_format => 'text',
:full_width_layout => '1',
:tracker_ids => [1], :is_for_all => true
)
get :index
assert_response :success
assert_select '#csv-export-form' do
assert_select 'input[value=?]', 'description'
assert_select 'input[value=?]', 'last_notes'
assert_select 'input[value=?]', "cf_#{field.id}"
end
end
def test_index_csv def test_index_csv
get :index, :params => { get :index, :params => {
:format => 'csv' :format => 'csv'
} }
assert_response :success assert_response :success
assert_equal 'text/csv', @response.media_type assert_equal 'text/csv', @response.media_type
assert response.body.starts_with?("#,") assert response.body.starts_with?("#,")
lines = response.body.chomp.split("\n") lines = response.body.chomp.split("\n")
# default columns + id and project # default columns + id and project
skipping to change at line 898 skipping to change at line 915
:set_filter => 1, :set_filter => 1,
:c =>["all_inline"], :c =>["all_inline"],
:project_id => "ecookbook", :project_id => "ecookbook",
:format => 'csv' :format => 'csv'
} }
assert_response :success assert_response :success
assert_equal [:subject, :due_date], session[:issue_query][:column_names] assert_equal [:subject, :due_date], session[:issue_query][:column_names]
end end
def test_index_pdf def test_index_pdf
["en", "zh", "zh-TW", "ja", "ko"].each do |lang| ["en", "zh", "zh-TW", "ja", "ko", "ar"].each do |lang|
with_settings :default_language => lang do with_settings :default_language => lang do
get :index get :index
assert_response :success assert_response :success
get :index, :params => { get :index, :params => {
:format => 'pdf' :format => 'pdf'
} }
assert_response :success assert_response :success
assert_equal 'application/pdf', @response.content_type assert_equal 'application/pdf', @response.content_type
skipping to change at line 2391 skipping to change at line 2408
:id => 3, :id => 3,
:format => 'pdf' :format => 'pdf'
} }
assert_response :success assert_response :success
assert_equal 'application/pdf', @response.content_type assert_equal 'application/pdf', @response.content_type
assert @response.body.starts_with?('%PDF') assert @response.body.starts_with?('%PDF')
end end
def test_export_to_pdf_with_utf8_u_fffd def test_export_to_pdf_with_utf8_u_fffd
issue = Issue.generate!(:subject => "�") issue = Issue.generate!(:subject => "�")
["en", "zh", "zh-TW", "ja", "ko"].each do |lang| ["en", "zh", "zh-TW", "ja", "ko", "ar"].each do |lang|
with_settings :default_language => lang do with_settings :default_language => lang do
get :show, :params => { get :show, :params => {
:id => issue.id, :id => issue.id,
:format => 'pdf' :format => 'pdf'
} }
assert_response :success assert_response :success
assert_equal 'application/pdf', @response.content_type assert_equal 'application/pdf', @response.content_type
assert @response.body.starts_with?('%PDF') assert @response.body.starts_with?('%PDF')
end end
end end
skipping to change at line 2440 skipping to change at line 2457
def test_show_export_to_pdf_with_journals def test_show_export_to_pdf_with_journals
get :show, :params => { get :show, :params => {
:id => 1, :id => 1,
:format => 'pdf' :format => 'pdf'
} }
assert_response :success assert_response :success
assert_equal 'application/pdf', @response.content_type assert_equal 'application/pdf', @response.content_type
assert @response.body.starts_with?('%PDF') assert @response.body.starts_with?('%PDF')
end end
def test_show_export_to_pdf_with_private_journal
Journal.create!(
:journalized => Issue.find(1),
:notes => 'Private notes',
:private_notes => true,
:user_id => 3
)
@request.session[:user_id] = 3
get(
:show,
:params => {
:id => 1,
:format => 'pdf'
}
)
assert_response :success
assert_equal 'application/pdf', @response.content_type
assert @response.body.starts_with?('%PDF')
end
def test_show_export_to_pdf_with_changesets def test_show_export_to_pdf_with_changesets
[[100], [100, 101], [100, 101, 102]].each do |cs| [[100], [100, 101], [100, 101, 102]].each do |cs|
issue1 = Issue.find(3) issue1 = Issue.find(3)
issue1.changesets = Changeset.find(cs) issue1.changesets = Changeset.find(cs)
issue1.save! issue1.save!
issue = Issue.find(3) issue = Issue.find(3)
assert_equal issue.changesets.count, cs.size assert_equal issue.changesets.count, cs.size
get :show, :params => { get :show, :params => {
:id => 3, :id => 3,
:format => 'pdf' :format => 'pdf'
 End of changes. 4 change blocks. 
2 lines changed or deleted 39 lines changed or added

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