server: add javascript test
This commit is contained in:
parent
76b1d24669
commit
e02115303c
2 changed files with 11 additions and 0 deletions
3
packages/ruby/server/test/fakeweb/js/index.js
Normal file
3
packages/ruby/server/test/fakeweb/js/index.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
(function() {
|
||||
console.log("Hello world");
|
||||
})();
|
|
@ -19,6 +19,14 @@ class ServerDirTest < Test::Unit::TestCase
|
|||
last_response.content_length
|
||||
end
|
||||
|
||||
def test_js_file
|
||||
get "/js/index.js"
|
||||
assert_equal 200, last_response.status
|
||||
assert_equal "application/javascript", last_response.content_type
|
||||
assert_equal bytesize("./test/fakeweb/js/index.js"),
|
||||
last_response.content_length
|
||||
end
|
||||
|
||||
def test_permission_denied
|
||||
File.chmod 0, "./test/fakeweb/permission_denied.html"
|
||||
get "/permission_denied.html"
|
||||
|
|
Loading…
Reference in a new issue