@@ -23,32 +23,20 @@ load '../../libs/version'
2323
2424load ' utils/_helpers'
2525
26- @test " defaults: Replace a defaults configuration" {
27- resource_put " $_DEFAULTS_BASE_PATH " " data/put.json" " "
28- assert_equal " $SC " 202
2926
30- resource_get " $_DEFAULTS_BASE_PATH " " "
27+ @test " defaults: Return a list of defaults configurations" {
28+ resource_get " $_DEFAULTS_BASE_PATH "
3129 assert_equal " $SC " 200
32-
33- assert_equal " $( get_json_path " $BODY " ' .server_timeout' ) " " 25000"
34- assert_equal " $( get_json_path " $BODY " ' .client_timeout' ) " " 25000"
35- assert_equal " $( get_json_path " $BODY " ' .mode' ) " " tcp"
30+ assert_equal " $( get_json_path " $BODY " ' .[0].name' ) " " unnamed_defaults_1"
3631}
3732
38- @test " defaults: Replace a named defaults configuration" {
39- resource_put " $_NAMED_DEFAULTS_BASE_PATH /unnamed_defaults_1" " data/put.json" " "
40- assert_equal " $SC " 202
41-
42- resource_get " $_NAMED_DEFAULTS_BASE_PATH /unnamed_defaults_1"
33+ @test " defaults: Return a defaults configuration" {
34+ resource_get " $_DEFAULTS_BASE_PATH /unnamed_defaults_1"
4335 assert_equal " $SC " 200
44-
4536 assert_equal " $( get_json_path " $BODY " ' .name' ) " " unnamed_defaults_1"
46- assert_equal " $( get_json_path " $BODY " ' .server_timeout' ) " " 25000"
47- assert_equal " $( get_json_path " $BODY " ' .client_timeout' ) " " 25000"
48- assert_equal " $( get_json_path " $BODY " ' .mode' ) " " tcp"
4937}
5038
51- @test " defaults: Replace a named defaults configuration that does not exist" {
52- resource_put " $_NAMED_DEFAULTS_BASE_PATH /nothing_to_see_here" " data/put.json " " "
39+ @test " defaults: Return a named defaults configuration that does not exist" {
40+ resource_get " $_DEFAULTS_BASE_PATH /nothing_to_see_here"
5341 assert_equal " $SC " 404
5442}
0 commit comments