blob: 19ea9bc96451fa38b3f6205599d5481c958602a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
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, nil,
[String, {query: { reduce: "false", key: "\"#{address}\"" }}]
query = Source.new(adapter)
query.query address
adapter.verify
end
end
end
|