diff options
author | azul <azul@riseup.net> | 2017-09-23 15:11:20 +0000 |
---|---|---|
committer | azul <azul@riseup.net> | 2017-09-23 15:11:20 +0000 |
commit | fac140a8ff76e98c275194845125d4c97f4ba07b (patch) | |
tree | 08ffafb2c70935892e975704911080b9da84e391 /test/unit/couch_db | |
parent | 787287318c54b019a12ef79525c9f5b10d93724d (diff) | |
parent | 8ac6bb8492c9a3b9ec5d7b5bf2b35907a1f8c332 (diff) |
Merge branch 'rubocop' into 'master'
Style fixes based on Rubocop
See merge request leap/nickserver!19
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 |