blob: fd078082ec133c7b1ec3e1dca3b96cd688167464 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
require 'test_helper'
require 'nickserver/couch_db/source'
module Nickserver::CouchDB
class SourceUnitTest < Minitest::Test
def test_query
address = "nick@domain.tl"
adapter = Minitest::Mock.new
adapter.expect :get, [200, nil],
[String, {query: { reduce: "false", key: "\"#{address}\"" }}]
Source.new(adapter).query address
adapter.verify
end
end
end
|