Displaying 1 result from an estimated 1 matches for "test_item_list_as_spreadsheet".
2007 Jan 11
0
Functional tests with actions that send files
...# details of writing data to the spreadsheet omitted for space
reasons
    workbook.close
    send_file filepath, :filename => ''Item List.xls'', :type =>
''application/vnd.ms-excel''
  end
--------------------------------------------------
test:
  def test_item_list_as_spreadsheet
    get :item_list_as_spreadsheet
    assert_response :success
    assert_equal ''binary'',
@response.headers[''Content-Transfer-Encoding'']
    assert_equal ''application/vnd.ms-excel; charset=utf-8'',
@response.headers[''Content-Type'...