(t *testing.T)
| 152 | } |
| 153 | |
| 154 | func TestRequireCommitMessage(t *testing.T) { |
| 155 | output, configuration := setup(t) |
| 156 | configuration.NextStay = true |
| 157 | configuration.RequireCommitMessage = true |
| 158 | start(configuration) |
| 159 | |
| 160 | next(configuration) |
| 161 | // ensure we don't complain if there's nothing to commit |
| 162 | // https://github.com/remotemobprogramming/mob/pull/107#issuecomment-761298861 |
| 163 | assertOutputContains(t, output, "nothing to commit") |
| 164 | |
| 165 | createFile(t, "example.txt", "contentIrrelevant") |
| 166 | next(configuration) |
| 167 | // failure message should make sense regardless of whether we |
| 168 | // provided commit message via `-m` or MOB_WIP_COMMIT_MESSAGE |
| 169 | // https://github.com/remotemobprogramming/mob/pull/107#issuecomment-761591039 |
| 170 | assertOutputContains(t, output, "commit message required") |
| 171 | } |
| 172 | |
| 173 | func TestDoneNotMobProgramming(t *testing.T) { |
| 174 | output, configuration := setup(t) |
nothing calls this directly
no test coverage detected