diff options
author | Azul <azul@riseup.net> | 2016-09-12 16:34:25 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2016-09-12 16:34:57 +0200 |
commit | ec875169b0231d84bb8c55bbe91c52b896561f1e (patch) | |
tree | bb4b47a79d32744bda8d66b2c02e9343bfc61698 /test/remote/celluloid_http_test.rb | |
parent | bc8ddfa1c49b438a563a8a8b9e0472944f71c71c (diff) |
test: separate remote tests into own directory
Dropped the webmock dependency. We have our own http adapter. So we can
stub that to inject a mock. As an added bonus this does not mess with
other http requests.
Also wrote down testing strategy. Not completely implemented yet.
Diffstat (limited to 'test/remote/celluloid_http_test.rb')
-rw-r--r-- | test/remote/celluloid_http_test.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/remote/celluloid_http_test.rb b/test/remote/celluloid_http_test.rb new file mode 100644 index 0000000..46a5259 --- /dev/null +++ b/test/remote/celluloid_http_test.rb @@ -0,0 +1,27 @@ +require 'test_helper' +require 'nickserver/adapters/celluloid_http' + +class Nickserver::Adapters::CelluloidHttpTest < Minitest::Test + + def setup + super + Celluloid.boot + end + + def teardown + Celluloid.shutdown + super + end + + def test_https_for_hkp + url = Nickserver::Config.hkp_url + status, _body = adapter.get url + assert_equal 404, status + end + + protected + + def adapter + @adapter ||= Nickserver::Adapters::CelluloidHttp.new + end +end |