@@ -32,14 +32,14 @@ def setup
3232 ' )
3333 @host = 'http://localhost:4010'
3434 @version = 'v3'
35- @http_options = { open_timeout : 60 , read_timeout : 60 }
35+ @http_options = { open_timeout : 60 , read_timeout : 60 }
3636 @client = MockRequest . new ( host : @host ,
3737 request_headers : @headers ,
3838 version : @version )
3939 @client_with_options = MockRequest . new ( host : @host ,
40- request_headers : @headers ,
41- version : @version ,
42- http_options : @http_options )
40+ request_headers : @headers ,
41+ version : @version ,
42+ http_options : @http_options )
4343 end
4444
4545 def test_init
@@ -67,7 +67,7 @@ def test_add_version
6767
6868 def test_build_query_params
6969 url = ''
70- query_params = { 'limit' => 100 , 'offset' => 0 , 'categories' => [ ' category1' , ' category2' ] }
70+ query_params = { 'limit' => 100 , 'offset' => 0 , 'categories' => %w[ category1 category2 ] }
7171 url = @client . build_query_params ( url , query_params )
7272 assert_equal ( '?limit=100&offset=0&categories=category1&categories=category2' , url )
7373 end
@@ -97,8 +97,8 @@ def test_build_request
9797 args = nil
9898 response = @client . build_request ( name , args )
9999 assert_equal ( 200 , response . status_code )
100- assert_equal ( { 'message' => 'success' } , response . body )
101- assert_equal ( { 'headers' => 'test' } , response . headers )
100+ assert_equal ( { 'message' => 'success' } , response . body )
101+ assert_equal ( { 'headers' => 'test' } , response . headers )
102102 end
103103
104104 def test_build_request_post_empty_content_type
@@ -109,7 +109,7 @@ def test_build_request_post_empty_content_type
109109 request_headers : headers ,
110110 version : 'v3'
111111 )
112- args = [ { 'request_body' => { " hogekey" => " hogevalue" } } ]
112+ args = [ { 'request_body' => { ' hogekey' => ' hogevalue' } } ]
113113 client . build_request ( 'post' , args )
114114 assert_equal ( 'application/json' , client . request [ 'Content-Type' ] )
115115 assert_equal ( '{"hogekey":"hogevalue"}' , client . request . body )
@@ -149,10 +149,10 @@ def test_build_request_post_multipart
149149 }
150150 client = MockRequest . new (
151151 host : 'https://localhost' ,
152- request_headers : headers ,
152+ request_headers : headers
153153 )
154154 name = 'post'
155- args = [ { 'request_body' => 'hogebody' } ]
155+ args = [ { 'request_body' => 'hogebody' } ]
156156 client . build_request ( name , args )
157157 assert_equal ( 'multipart/form-data; boundary=xYzZY' , client . request [ 'Content-Type' ] )
158158 assert_equal ( 'hogebody' , client . request . body )
@@ -174,8 +174,8 @@ def test__
174174 def test_method_missing
175175 response = @client . get
176176 assert_equal ( 200 , response . status_code )
177- assert_equal ( { 'message' => 'success' } , response . body )
178- assert_equal ( { 'headers' => 'test' } , response . headers )
177+ assert_equal ( { 'message' => 'success' } , response . body )
178+ assert_equal ( { 'headers' => 'test' } , response . headers )
179179 end
180180
181181 def test_http_options
@@ -273,14 +273,10 @@ def test_troubleshooting_exists
273273 assert ( File . file? ( './TROUBLESHOOTING.md' ) )
274274 end
275275
276- # def test_usage_exists
277- # assert(File.file?('./USAGE .md'))
278- # end
276+ def test_use_cases_exists
277+ assert ( File . file? ( 'use_cases/README .md' ) )
278+ end
279279
280- # def test_use_cases_exists
281- # assert(File.file?('./USE_CASES.md'))
282- # end
283-
284280 def test_license_date_is_updated
285281 license_end_year = IO . read ( 'LICENSE.txt' ) . match ( /Copyright \( c\) 2016-(\d {4}) SendGrid/ ) [ 1 ] . to_i
286282 current_year = Time . new . year
0 commit comments