Skip to content

Commit bdc0618

Browse files
committed
Fixed client http_error test, and added a not_found test.
1 parent fdb37dc commit bdc0618

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

test/client/tc_exception.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ class ExceptionTest < Test::Unit::TestCase
44

55
def test_http_error
66
client = OAI::Client.new 'http://www.example.com'
7-
assert_raises(OAI::Exception) { client.identify }
7+
assert_raises(Errno::ETIMEDOUT) { client.identify }
8+
end
9+
10+
def test_not_found
11+
client = OAI::Client.new 'http://www.google.com'
12+
assert_raises(ArgumentError) { client.identify }
813
end
914

1015
def test_xml_error

0 commit comments

Comments
 (0)