summaryrefslogtreecommitdiff
path: root/test/unit/error_response_test.rb
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-09-12 11:42:02 +0200
committerAzul <azul@riseup.net>2016-09-12 11:42:02 +0200
commitce09dd9c21d79e2260f9436e41f9970b42935b27 (patch)
treef620f8bf3d7386d8a5a48b1feb0a18c58269c128 /test/unit/error_response_test.rb
parentf18d698d09afda894a568de79c5770704a0c9de7 (diff)
[wip] nicknym source query implemented
Also changed Nickserver::Response to not include the status code. This may be okay for error responses but in most cases we want to have a parsable message and not some status code prepended to it.
Diffstat (limited to 'test/unit/error_response_test.rb')
-rw-r--r--test/unit/error_response_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/unit/error_response_test.rb b/test/unit/error_response_test.rb
new file mode 100644
index 0000000..7242b38
--- /dev/null
+++ b/test/unit/error_response_test.rb
@@ -0,0 +1,12 @@
+require 'test_helper'
+require 'nickserver/error_response'
+
+class ErrorResponseTest < Minitest::Test
+
+ def test_content
+ response = Nickserver::ErrorResponse.new "Not a valid address"
+ assert_equal "500 Not a valid address\n", response.content
+ assert_equal 500, response.status
+ end
+
+end