diff options
author | Andrei Belov <defan@nginx.com> | 2019-11-14 19:29:00 +0300 |
---|---|---|
committer | Andrei Belov <defan@nginx.com> | 2019-11-14 19:29:00 +0300 |
commit | 7630539c44fcb188bba03a65af34e952a81f2f38 (patch) | |
tree | 2c80f0cd315cae8079a39ba98ed89e02b5e1931a /test/test_ruby_application.py | |
parent | 70c9f18b6e8b25850bce8eb1edba4d100c3e55d2 (diff) | |
parent | 0a27f137de776925a24406cf6961c550824c63a0 (diff) | |
download | unit-7630539c44fcb188bba03a65af34e952a81f2f38.tar.gz unit-7630539c44fcb188bba03a65af34e952a81f2f38.tar.bz2 |
Merged with the default branch.1.13.0-1
Diffstat (limited to 'test/test_ruby_application.py')
-rw-r--r-- | test/test_ruby_application.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/test_ruby_application.py b/test/test_ruby_application.py index 6f82ae81..bbb252d7 100644 --- a/test/test_ruby_application.py +++ b/test/test_ruby_application.py @@ -347,6 +347,29 @@ class TestRubyApplication(TestApplicationRuby): self.assertEqual(resp['body'], '0123456789', 'keep-alive 2') + def test_ruby_application_constants(self): + self.load('constants') + + resp = self.get() + + self.assertEqual(resp['status'], 200, 'status') + + headers = resp['headers'] + self.assertGreater(len(headers['X-Copyright']), 0, 'RUBY_COPYRIGHT') + self.assertGreater( + len(headers['X-Description']), 0, 'RUBY_DESCRIPTION' + ) + self.assertGreater(len(headers['X-Engine']), 0, 'RUBY_ENGINE') + self.assertGreater( + len(headers['X-Engine-Version']), 0, 'RUBY_ENGINE_VERSION' + ) + self.assertGreater(len(headers['X-Patchlevel']), 0, 'RUBY_PATCHLEVEL') + self.assertGreater(len(headers['X-Platform']), 0, 'RUBY_PLATFORM') + self.assertGreater( + len(headers['X-Release-Date']), 0, 'RUBY_RELEASE_DATE' + ) + self.assertGreater(len(headers['X-Revision']), 0, 'RUBY_REVISION') + self.assertGreater(len(headers['X-Version']), 0, 'RUBY_VERSION') if __name__ == '__main__': TestRubyApplication.main() |