diff options
Diffstat (limited to 'test/unit/couch_db')
-rw-r--r-- | test/unit/couch_db/response_test.rb | 12 | ||||
-rw-r--r-- | test/unit/couch_db/source_unit_test.rb | 9 |
2 files changed, 10 insertions, 11 deletions
diff --git a/test/unit/couch_db/response_test.rb b/test/unit/couch_db/response_test.rb index d44760d..3003307 100644 --- a/test/unit/couch_db/response_test.rb +++ b/test/unit/couch_db/response_test.rb @@ -6,20 +6,20 @@ class Nickserver::CouchDB::ResponseTest < Minitest::Test include FileContent def test_404 - response = response_for "bananas@example.org", - status: 404, body: "{}" + response = response_for 'bananas@example.org', + status: 404, body: '{}' assert_equal 404, response.status end def test_200_with_empty_response - response = response_for "stompy@example.org", - status: 200, body: file_content(:empty_couchdb_result) + response = response_for 'stompy@example.org', + status: 200, body: file_content(:empty_couchdb_result) assert_equal 404, response.status end def test_200_with_success - response = response_for "blue@example.org", - status: 200, body: file_content(:blue_couchdb_result) + response = response_for 'blue@example.org', + status: 200, body: file_content(:blue_couchdb_result) assert_equal 200, response.status assert_equal file_content(:blue_nickserver_result), response.content end diff --git a/test/unit/couch_db/source_unit_test.rb b/test/unit/couch_db/source_unit_test.rb index e5a4f43..d14ff2f 100644 --- a/test/unit/couch_db/source_unit_test.rb +++ b/test/unit/couch_db/source_unit_test.rb @@ -3,21 +3,20 @@ require 'nickserver/couch_db/source' module Nickserver::CouchDB class SourceUnitTest < Minitest::Test - def test_query - address = "nick@domain.tl" + address = 'nick@domain.tl' adapter = Minitest::Mock.new adapter.expect :get, [200, nil], - [String, {query: { reduce: "false", key: "\"#{address}\"" }}] + [String, { query: { reduce: 'false', key: "\"#{address}\"" } }] Source.new(adapter).query address adapter.verify end def test_401 - address = "nick@domain.tl" + address = 'nick@domain.tl' adapter = Minitest::Mock.new adapter.expect :get, [401, nil], - [String, {query: { reduce: "false", key: "\"#{address}\"" }}] + [String, { query: { reduce: 'false', key: "\"#{address}\"" } }] assert_raises Error do Source.new(adapter).query address end |