Mercurial > prosody-hg
comparison spec/core_configmanager_spec.lua @ 10495:8ea685ec0979
configmanager tests: Split long line
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 09 Dec 2019 11:57:10 +0000 |
| parents | 29de7ad20250 |
| children |
comparison
equal
deleted
inserted
replaced
| 10494:69e55b03d5cf | 10495:8ea685ec0979 |
|---|---|
| 7 configmanager.set("example.com", "testkey", 123); | 7 configmanager.set("example.com", "testkey", 123); |
| 8 assert.are.equal(123, configmanager.get("example.com", "testkey"), "Retrieving a set key"); | 8 assert.are.equal(123, configmanager.get("example.com", "testkey"), "Retrieving a set key"); |
| 9 | 9 |
| 10 configmanager.set("*", "testkey1", 321); | 10 configmanager.set("*", "testkey1", 321); |
| 11 assert.are.equal(321, configmanager.get("*", "testkey1"), "Retrieving a set global key"); | 11 assert.are.equal(321, configmanager.get("*", "testkey1"), "Retrieving a set global key"); |
| 12 assert.are.equal(321, configmanager.get("example.com", "testkey1"), "Retrieving a set key of undefined host, of which only a globally set one exists"); | 12 assert.are.equal(321, configmanager.get("example.com", "testkey1"), |
| 13 "Retrieving a set key of undefined host, of which only a globally set one exists" | |
| 14 ); | |
| 13 | 15 |
| 14 configmanager.set("example.com", ""); -- Creates example.com host in config | 16 configmanager.set("example.com", ""); -- Creates example.com host in config |
| 15 assert.are.equal(321, configmanager.get("example.com", "testkey1"), "Retrieving a set key, of which only a globally set one exists"); | 17 assert.are.equal(321, configmanager.get("example.com", "testkey1"), "Retrieving a set key, of which only a globally set one exists"); |
| 16 | 18 |
| 17 assert.are.equal(nil, configmanager.get(), "No parameters to get()"); | 19 assert.are.equal(nil, configmanager.get(), "No parameters to get()"); |
