(t *testing.T)
| 23 | } |
| 24 | |
| 25 | func TestGenerateModules(t *testing.T) { |
| 26 | teardown, tmpDir := setupTeardown(t) |
| 27 | defer teardown(t) |
| 28 | |
| 29 | projectConfig := projectconfig.ZeroProjectConfig{ |
| 30 | Name: "foo", |
| 31 | Modules: projectconfig.Modules{ |
| 32 | "mod1": projectconfig.NewModule(map[string]string{"test": "bar"}, tmpDir, "github.com/fake-org/repo-foo", baseTestFixturesDir, []string{}, []projectconfig.Condition{}), |
| 33 | }, |
| 34 | } |
| 35 | generate.Generate(projectConfig, true) |
| 36 | |
| 37 | content, err := ioutil.ReadFile(filepath.Join(tmpDir, "file_to_template.txt")) |
| 38 | assert.NoError(t, err) |
| 39 | |
| 40 | expectedContent := `Name is foo |
| 41 | Params.test is bar |
| 42 | Files.Repository is github.com/fake-org/repo-foo |
| 43 | ` |
| 44 | assert.Equal(t, string(content), expectedContent) |
| 45 | } |
nothing calls this directly
no test coverage detected