diff options
| author | 2019-01-14 01:40:56 -0500 | |
|---|---|---|
| committer | 2019-01-14 01:40:56 -0500 | |
| commit | dddfa903d2b856146f05ffb4415c31d6127bb5bf (patch) | |
| tree | e38c2aca92b54f06ccd0185f48dc47e3e1b3d77e /test/roo/test_csv.rb | |
| parent | 8280a21a23d44aa90177e2bc041d0b8dc8556f4b (diff) | |
New upstream version 2.8.0upstream/2.8.0
Diffstat (limited to 'test/roo/test_csv.rb')
| -rw-r--r-- | test/roo/test_csv.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/roo/test_csv.rb b/test/roo/test_csv.rb index c5e251d..336191b 100644 --- a/test/roo/test_csv.rb +++ b/test/roo/test_csv.rb @@ -13,6 +13,34 @@ class TestRooCSV < Minitest::Test end end + def test_download_uri_with_query_string + file = filename("simple_spreadsheet") + port = 12_347 + url = "#{local_server(port)}/#{file}?query-param=value" + + start_local_server(file, port) do + csv = roo_class.new(url) + assert_equal "Task 1", csv.cell("f", 4) + assert_equal 1, csv.first_row + assert_equal 13, csv.last_row + assert_equal 1, csv.first_column + assert_equal 6, csv.last_column + end + end + + def test_open_stream + file = filename("Bibelbund") + file_contents = File.read File.join(TESTDIR, file) + stream = StringIO.new(file_contents) + csv = roo_class.new(stream) + + assert_equal "Aktuelle Seite", csv.cell("h", 12) + assert_equal 1, csv.first_row + assert_equal 3735, csv.last_row + assert_equal 1, csv.first_column + assert_equal 8, csv.last_column + end + def test_nil_rows_and_lines_csv # x_123 oo = Roo::CSV.new(File.join(TESTDIR,'Bibelbund.csv')) |
