summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-12-21 15:30:40 -0700
committermo khan <mo.khan@gmail.com>2020-12-21 15:30:40 -0700
commita4e0247551ff0e493c91c812e0ad9a3c038eee12 (patch)
tree795d6939b32b257d91c1ee822ec6a123602660d6 /test
parent26f31fe1fa573b06a8399a39a101875be7626b20 (diff)
test: add test for GET /
Diffstat (limited to 'test')
-rw-r--r--test/integration/server_test.rb14
-rw-r--r--test/test_helper.rb3
2 files changed, 17 insertions, 0 deletions
diff --git a/test/integration/server_test.rb b/test/integration/server_test.rb
new file mode 100644
index 0000000..3ca8b72
--- /dev/null
+++ b/test/integration/server_test.rb
@@ -0,0 +1,14 @@
+class ServerTest < Minitest::Test
+ include Rack::Test::Methods
+
+ def app
+ Server.new
+ end
+
+ def test_get
+ get '/'
+
+ assert_equal 200, last_response.status
+ assert_empty last_response.body
+ end
+end
diff --git a/test/test_helper.rb b/test/test_helper.rb
new file mode 100644
index 0000000..1734719
--- /dev/null
+++ b/test/test_helper.rb
@@ -0,0 +1,3 @@
+require 'minitest/autorun'
+require 'rack/test'
+require 'server'