Skip to content

Commit

Permalink
invalid hostname test
Browse files Browse the repository at this point in the history
  • Loading branch information
igrigorik committed Feb 4, 2011
1 parent c61a8a8 commit ac55d7d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/em_test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'eventmachine'
require 'lib/eventmachine'
require 'test/unit'
require 'rbconfig'
require 'socket'
Expand Down
10 changes: 9 additions & 1 deletion tests/test_resolver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ def test_bad_host
}
end

def test_garbage
assert_raises( ArgumentError ) {
EM.run {
EM::DNS::Resolver.resolve 123
}
}
end

def test_a_pair
EM.run {
d = EM::DNS::Resolver.resolve "google.com"
Expand All @@ -31,4 +39,4 @@ def test_a_pair
}
}
end
end
end

0 comments on commit ac55d7d

Please sign in to comment.