(t *testing.T)
| 86 | } |
| 87 | |
| 88 | func TestFunctionalOptAtTheEndWins(t *testing.T) { |
| 89 | userVisibleMod := func(option *module) { |
| 90 | option.userVisible = true |
| 91 | } |
| 92 | sut := NewManager(log.NewNopLogger()) |
| 93 | sut.RegisterModule("mod1", mockInitFunc, UserInvisibleModule, userVisibleMod, UserInvisibleModule) |
| 94 | |
| 95 | m := sut.modules["mod1"] |
| 96 | |
| 97 | assert.NotNil(t, mockInitFunc, m.initFn, "initFn not assigned") |
| 98 | assert.False(t, m.userVisible, "module should be internal") |
| 99 | } |
| 100 | |
| 101 | func TestGetAllUserVisibleModulesNames(t *testing.T) { |
| 102 | sut := NewManager(log.NewNopLogger()) |
nothing calls this directly
no test coverage detected