Updated tests regarding new puma behaviour with no specified content type on request.
This commit is contained in:
parent
3277ab23d5
commit
77bab373c9
1 changed files with 7 additions and 7 deletions
|
@ -18,7 +18,7 @@ class UserAgentTest < ActiveSupport::TestCase
|
||||||
assert_equal(String, result.body.class)
|
assert_equal(String, result.body.class)
|
||||||
assert(result.body =~ /"get"/)
|
assert(result.body =~ /"get"/)
|
||||||
assert(result.body =~ /"123"/)
|
assert(result.body =~ /"123"/)
|
||||||
assert(result.body =~ %r{"text/plain"})
|
assert(result.body =~ /"content_type_requested":null/)
|
||||||
|
|
||||||
# get / 404
|
# get / 404
|
||||||
result = UserAgent.get(
|
result = UserAgent.get(
|
||||||
|
@ -92,7 +92,7 @@ class UserAgentTest < ActiveSupport::TestCase
|
||||||
assert_equal('200', result.code)
|
assert_equal('200', result.code)
|
||||||
assert_equal(String, result.body.class)
|
assert_equal(String, result.body.class)
|
||||||
assert(result.body =~ /"delete"/)
|
assert(result.body =~ /"delete"/)
|
||||||
assert(result.body =~ %r{"text/plain"})
|
assert(result.body =~ /"content_type_requested":null/)
|
||||||
|
|
||||||
# delete / 404
|
# delete / 404
|
||||||
result = UserAgent.delete(
|
result = UserAgent.delete(
|
||||||
|
@ -120,7 +120,7 @@ class UserAgentTest < ActiveSupport::TestCase
|
||||||
assert_equal(String, result.body.class)
|
assert_equal(String, result.body.class)
|
||||||
assert(result.body =~ /"get"/)
|
assert(result.body =~ /"get"/)
|
||||||
assert(result.body =~ /"123"/)
|
assert(result.body =~ /"123"/)
|
||||||
assert(result.body =~ %r{"text/plain"})
|
assert(result.body =~ /"content_type_requested":null/)
|
||||||
|
|
||||||
# get / 401
|
# get / 401
|
||||||
result = UserAgent.get(
|
result = UserAgent.get(
|
||||||
|
@ -219,7 +219,7 @@ class UserAgentTest < ActiveSupport::TestCase
|
||||||
assert_equal('200', result.code)
|
assert_equal('200', result.code)
|
||||||
assert_equal(String, result.body.class)
|
assert_equal(String, result.body.class)
|
||||||
assert(result.body =~ /"delete"/)
|
assert(result.body =~ /"delete"/)
|
||||||
assert(result.body =~ %r{"text/plain"})
|
assert(result.body =~ /"content_type_requested":null/)
|
||||||
|
|
||||||
# delete / 401
|
# delete / 401
|
||||||
result = UserAgent.delete(
|
result = UserAgent.delete(
|
||||||
|
@ -248,7 +248,7 @@ class UserAgentTest < ActiveSupport::TestCase
|
||||||
assert_equal(String, result.body.class)
|
assert_equal(String, result.body.class)
|
||||||
assert(result.body =~ /"get"/)
|
assert(result.body =~ /"get"/)
|
||||||
assert(result.body =~ /"abc"/)
|
assert(result.body =~ /"abc"/)
|
||||||
assert(result.body =~ %r{"text/plain"})
|
assert(result.body =~ /"content_type_requested":null/)
|
||||||
|
|
||||||
# get / 301
|
# get / 301
|
||||||
result = UserAgent.request(
|
result = UserAgent.request(
|
||||||
|
@ -264,7 +264,7 @@ class UserAgentTest < ActiveSupport::TestCase
|
||||||
assert_equal(String, result.body.class)
|
assert_equal(String, result.body.class)
|
||||||
assert(result.body =~ /"get"/)
|
assert(result.body =~ /"get"/)
|
||||||
assert(result.body =~ /"abc"/)
|
assert(result.body =~ /"abc"/)
|
||||||
assert(result.body =~ %r{"text/plain"})
|
assert(result.body =~ /"content_type_requested":null/)
|
||||||
|
|
||||||
# get / 401
|
# get / 401
|
||||||
result = UserAgent.request(
|
result = UserAgent.request(
|
||||||
|
@ -293,7 +293,7 @@ class UserAgentTest < ActiveSupport::TestCase
|
||||||
assert_equal(String, result.body.class)
|
assert_equal(String, result.body.class)
|
||||||
assert(result.body =~ /"get"/)
|
assert(result.body =~ /"get"/)
|
||||||
assert(result.body =~ /"123"/)
|
assert(result.body =~ /"123"/)
|
||||||
assert(result.body =~ %r{"text/plain"})
|
assert(result.body =~ /"content_type_requested":null/)
|
||||||
|
|
||||||
# ftp / 200
|
# ftp / 200
|
||||||
result = UserAgent.request(
|
result = UserAgent.request(
|
||||||
|
|
Loading…
Reference in a new issue