|
24 | 24 | end
|
25 | 25 |
|
26 | 26 | it "returns validated configuration with minimal fields" do
|
27 |
| - config = {} |
| 27 | + config = { handler_plugin_dir: "/path/to/handlers" } |
28 | 28 |
|
29 | 29 | result = described_class.validate_global_config(config)
|
30 | 30 |
|
31 |
| - expect(result).to eq({}) |
| 31 | + expect(result).to eq({ handler_plugin_dir: "/path/to/handlers" }) |
32 | 32 | end
|
33 | 33 |
|
34 | 34 | it "accepts production environment" do
|
35 |
| - config = { environment: "production" } |
| 35 | + config = { |
| 36 | + environment: "production", |
| 37 | + handler_plugin_dir: "/path/to/handlers" |
| 38 | + } |
36 | 39 |
|
37 | 40 | result = described_class.validate_global_config(config)
|
38 | 41 |
|
|
41 | 44 |
|
42 | 45 | it "accepts valid log levels" do
|
43 | 46 | %w[debug info warn error].each do |log_level|
|
44 |
| - config = { log_level: log_level } |
| 47 | + config = { |
| 48 | + log_level: log_level, |
| 49 | + handler_plugin_dir: "/path/to/handlers" |
| 50 | + } |
45 | 51 |
|
46 | 52 | result = described_class.validate_global_config(config)
|
47 | 53 |
|
|
114 | 120 | it "coerces boolean-like string values" do
|
115 | 121 | config = {
|
116 | 122 | use_catchall_route: "true",
|
117 |
| - normalize_headers: "1" |
| 123 | + normalize_headers: "1", |
| 124 | + handler_plugin_dir: "/path/to/handlers" |
118 | 125 | }
|
119 | 126 |
|
120 | 127 | result = described_class.validate_global_config(config)
|
|
138 | 145 | it "coerces string numeric values" do
|
139 | 146 | config = {
|
140 | 147 | request_limit: "1024",
|
141 |
| - request_timeout: "30" |
| 148 | + request_timeout: "30", |
| 149 | + handler_plugin_dir: "/path/to/handlers" |
142 | 150 | }
|
143 | 151 |
|
144 | 152 | result = described_class.validate_global_config(config)
|
|
164 | 172 | end
|
165 | 173 |
|
166 | 174 | it "coerces float values to integers by truncating" do
|
167 |
| - config = { request_timeout: 30.5 } |
| 175 | + config = { |
| 176 | + request_timeout: 30.5, |
| 177 | + handler_plugin_dir: "/path/to/handlers" |
| 178 | + } |
168 | 179 |
|
169 | 180 | result = described_class.validate_global_config(config)
|
170 | 181 |
|
|
0 commit comments