File: search_batch_test.rb

package info (click to toggle)
ruby-zoom 0.4.1-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 296 kB
  • ctags: 99
  • sloc: ansic: 680; xml: 262; ruby: 254; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 446 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'test/unit'
require 'zoom'

class SearchBatchTest < Test::Unit::TestCase
  # Terry Reese 9-17-07
  # Test for batch results
  def test_search_batch_test
    ZOOM::Connection.open('z3950.loc.gov', 7090) do |conn|
      conn.database_name = 'Voyager'
      conn.preferred_record_syntax = 'USMARC'
      result_set = conn.search('@attr 1=4 "Oregon"')
      records = result_set[0..10]
      assert_equal 10, records.length
    end
  end
end