summaryrefslogtreecommitdiff
path: root/test/unit/hkp/v_index_response_test.rb
blob: d90952003d3f5c238d571685d810a7bab7004c82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'test_helper'
require 'file_content'
require 'nickserver/hkp/v_index_response'

class Nickserver::Hkp::VIndexResponseTest < Minitest::Test
  include FileContent

  def test_leap_public_key
    response = response_for 'cloudadmin@leap.se',
      body: file_content(:leap_vindex_result)
    assert_equal 'E818C478D3141282F7590D29D041EB11B1647490', response.keys.first.keyid
  end

  def response_for(uid, hkp_response = {})
    Nickserver::Hkp::VIndexResponse.new uid, hkp_response
  end
end