@@ -23,32 +23,20 @@ load '../../libs/version'
23
23
24
24
load ' utils/_helpers'
25
25
26
- @test " defaults: Replace a defaults configuration" {
27
- resource_put " $_DEFAULTS_BASE_PATH " " data/put.json" " "
28
- assert_equal " $SC " 202
29
26
30
- resource_get " $_DEFAULTS_BASE_PATH " " "
27
+ @test " defaults: Return a list of defaults configurations" {
28
+ resource_get " $_DEFAULTS_BASE_PATH "
31
29
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"
36
31
}
37
32
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"
43
35
assert_equal " $SC " 200
44
-
45
36
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"
49
37
}
50
38
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"
53
41
assert_equal " $SC " 404
54
42
}
0 commit comments