summaryrefslogtreecommitdiff
path: root/test/remote/celluloid_http_test.rb
blob: d5d33b46bdb2fd6f1f06c8fbf8be7f52f85be3df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
  rescue HTTP::ConnectionError => e
    skip "could not talk to hkp server: #{e}"
  end

  protected

  def adapter
    @adapter ||= Nickserver::Adapters::CelluloidHttp.new
  end
end