diff options
| author | mo khan <mo.khan@gmail.com> | 2020-11-21 15:07:05 -0700 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-11-21 15:07:05 -0700 |
| commit | b10b1d0f1a4735a98160c028a28989539787b334 (patch) | |
| tree | f44409ea153dae3887e7f883766b8efc3f305800 | |
| parent | 25c304c14a6ec9841ce03b0482e6a507ef73d811 (diff) | |
feat: respond with HTTP status code 404 (Not Found)
| -rw-r--r-- | server-rack.rb | 2 | ||||
| -rw-r--r-- | test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/server-rack.rb b/server-rack.rb index e16d383..fbfd62a 100644 --- a/server-rack.rb +++ b/server-rack.rb @@ -26,7 +26,7 @@ class DataStorageServer if @storage.key?(oid) ['200', {}, [@storage[oid]]] else - ['200', {}, ["hello from get #{path}"]] + ['404', {}, []] end end @@ -35,7 +35,7 @@ class DataStorageServerTest < Minitest::Test assert_equal 'other object', last_response.body end - def xtest_get_not_found + def test_get_not_found get '/data/foo/noooope' assert_equal 404, last_response.status end |
