| 49 | } |
| 50 | |
| 51 | func TestConfig_FullName(t *testing.T) { |
| 52 | tests := map[string]struct { |
| 53 | cfg Config |
| 54 | expected any |
| 55 | }{ |
| 56 | "name == module": {cfg: Config{"name": "name", "module": "name"}, expected: "name"}, |
| 57 | "name != module": {cfg: Config{"name": "name", "module": "module"}, expected: "module_name"}, |
| 58 | "nil cfg": {expected: ""}, |
| 59 | } |
| 60 | |
| 61 | for name, test := range tests { |
| 62 | t.Run(name, func(t *testing.T) { |
| 63 | assert.Equal(t, test.expected, test.cfg.FullName()) |
| 64 | }) |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | func TestConfig_UpdateEvery(t *testing.T) { |
| 69 | tests := map[string]struct { |