(t *testing.T)
| 6 | ) |
| 7 | |
| 8 | func TestStartDoneCoAuthors(t *testing.T) { |
| 9 | _, configuration := setup(t) |
| 10 | |
| 11 | setWorkingDir(tempDir + "/alice") |
| 12 | start(configuration) |
| 13 | createFile(t, "file3.txt", "contentIrrelevant") |
| 14 | next(configuration) |
| 15 | |
| 16 | setWorkingDir(tempDir + "/local") |
| 17 | start(configuration) |
| 18 | createFile(t, "file1.txt", "contentIrrelevant") |
| 19 | next(configuration) |
| 20 | |
| 21 | setWorkingDir(tempDir + "/localother") |
| 22 | start(configuration) |
| 23 | createFile(t, "file2.txt", "contentIrrelevant") |
| 24 | next(configuration) |
| 25 | |
| 26 | setWorkingDir(tempDir + "/alice") |
| 27 | start(configuration) |
| 28 | createFile(t, "file4.txt", "contentIrrelevant") |
| 29 | next(configuration) |
| 30 | |
| 31 | setWorkingDir(tempDir + "/bob") |
| 32 | start(configuration) |
| 33 | createFile(t, "file5.txt", "contentIrrelevant") |
| 34 | next(configuration) |
| 35 | |
| 36 | setWorkingDir(tempDir + "/local") |
| 37 | start(configuration) |
| 38 | done(configuration) |
| 39 | |
| 40 | output := readFile(t, filepath.Join(tempDir, "local", ".git", "SQUASH_MSG")) |
| 41 | |
| 42 | // don't include the person running `mob done` |
| 43 | assertOutputNotContains(t, &output, "Co-authored-by: local <local@example.com>") |
| 44 | // include everyone else in commit order after removing duplicates |
| 45 | assertOutputContains(t, &output, "\nCo-authored-by: bob <bob@example.com>\nCo-authored-by: alice <alice@example.com>\nCo-authored-by: localother <localother@example.com>\n") |
| 46 | } |
| 47 | |
| 48 | func TestCreateCommitMessage(t *testing.T) { |
| 49 | equals(t, ` |
nothing calls this directly
no test coverage detected