summaryrefslogtreecommitdiff
path: root/test/integration
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/integration
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/integration')
-rw-r--r--test/integration/dispatcher_test.rb6
-rw-r--r--test/integration/nicknym_test.rb11
2 files changed, 14 insertions, 3 deletions
diff --git a/test/integration/dispatcher_test.rb b/test/integration/dispatcher_test.rb
index 4ec823b..60ad9d7 100644
--- a/test/integration/dispatcher_test.rb
+++ b/test/integration/dispatcher_test.rb
@@ -38,10 +38,10 @@ class Nickserver::DispatcherTest < Minitest::Test
handle fingerprint: ['E36E738D69173C13D709E44F2F455E2824D18DDF']
source = Minitest::Mock.new
source.expect :get_key_by_fingerprint,
- Nickserver::Response.new(200, "fake fingerprint"),
+ Nickserver::Response.new(200, "fake key response"),
['E36E738D69173C13D709E44F2F455E2824D18DDF']
Nickserver::Hkp::Source.stub :new, source do
- assert_response status: 200, content: "200 fake fingerprint"
+ assert_response status: 200, content: "fake key response"
end
end
@@ -62,7 +62,7 @@ class Nickserver::DispatcherTest < Minitest::Test
source = Minitest::Mock.new
source.expect :query, Nickserver::Response.new(200, "fake content"), [Nickserver::EmailAddress]
Nickserver::Hkp::Source.stub :new, source do
- assert_response status: 200, content: "200 fake content"
+ assert_response status: 200, content: "fake content"
end
end
diff --git a/test/integration/nicknym_test.rb b/test/integration/nicknym_test.rb
new file mode 100644
index 0000000..bfcd7e1
--- /dev/null
+++ b/test/integration/nicknym_test.rb
@@ -0,0 +1,11 @@
+require 'test_helper'
+require 'support/client_integration_test'
+require 'nickserver/nicknym/source'
+
+class NicknymClientTest < ClientIntegrationTest
+
+ def test_truth
+ assert true
+ end
+
+end