summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-11-21 16:11:45 -0700
committermo khan <mo.khan@gmail.com>2020-11-21 16:11:45 -0700
commit73504a6b17408758155da297f4f1d78f31f7c4ca (patch)
tree825eaaf2581f653c8142e0a853bef99d5c2c3bf5 /test
parentbe35ec3d45b03e273fadb7b38f3d3f59717887a4 (diff)
feat: return 400 (Bad Request) when max blob size is exceeded
Diffstat (limited to 'test')
-rw-r--r--test/integration/data_storage_server_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/integration/data_storage_server_test.rb b/test/integration/data_storage_server_test.rb
index 26cfe87..0c3d662 100644
--- a/test/integration/data_storage_server_test.rb
+++ b/test/integration/data_storage_server_test.rb
@@ -15,6 +15,15 @@ class DataStorageServerTest < Minitest::Test
assert result["oid"].length > 0
end
+ def test_put_exceeds_max_blob_size
+ four_k = (1024 * 4)
+ data = 'a' * (four_k + 1)
+ put '/data/foo', data
+
+ assert_equal 400, last_response.status
+ assert last_response.body.empty?
+ end
+
def test_get
put '/data/foo', 'some object'
res1 = JSON.parse(last_response.body)