MCPcopy Create free account
hub / github.com/remotemobprogramming/mob / TestRequireCommitMessage

Function TestRequireCommitMessage

mob_test.go:154–171  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

152}
153
154func 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
173func TestDoneNotMobProgramming(t *testing.T) {
174 output, configuration := setup(t)

Callers

nothing calls this directly

Calls 5

setupFunction · 0.85
startFunction · 0.85
nextFunction · 0.85
assertOutputContainsFunction · 0.85
createFileFunction · 0.85

Tested by

no test coverage detected