Skip to content

Commit b5b9d3b

Browse files
committed
fix #441 mob break 5 is not parsed correctly
1 parent 015d5a6 commit b5b9d3b

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

mob.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
)
2222

2323
const (
24-
versionNumber = "5.1.0"
24+
versionNumber = "5.1.1"
2525
minimumGitVersion = "2.13.0"
2626
)
2727

timer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func getMobTimerRoom(configuration config.Configuration) string {
8787
}
8888

8989
func StartBreakTimer(timerInMinutes string, configuration config.Configuration) {
90-
if err := startBreakTimer(configuration.Timer, configuration); err != nil {
90+
if err := startBreakTimer(timerInMinutes, configuration); err != nil {
9191
Exit(1)
9292
}
9393
}

timer_test.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,17 @@ func TestTimer(t *testing.T) {
6363
assertOutputContains(t, output, "Happy collaborating! :)")
6464
}
6565

66+
func TestTimerExportFunction(t *testing.T) {
67+
output, configuration := setup(t)
68+
configuration.NotifyCommand = ""
69+
configuration.VoiceCommand = ""
70+
71+
StartTimer("1", configuration)
72+
73+
assertOutputContains(t, output, "1 min timer ends at approx.")
74+
assertOutputContains(t, output, "Happy collaborating! :)")
75+
}
76+
6677
func TestBreakTimerNumberLessThen1(t *testing.T) {
6778
output, configuration := setup(t)
6879

@@ -92,3 +103,14 @@ func TestBreakTimer(t *testing.T) {
92103
assertOutputContains(t, output, "1 min break timer ends at approx.")
93104
assertOutputContains(t, output, "So take a break now! :)")
94105
}
106+
107+
func TestBreakTimerExportFunction(t *testing.T) {
108+
output, configuration := setup(t)
109+
configuration.NotifyCommand = ""
110+
configuration.VoiceCommand = ""
111+
112+
StartBreakTimer("5", configuration)
113+
114+
assertOutputContains(t, output, "5 min break timer ends at approx.")
115+
assertOutputContains(t, output, "So take a break now! :)")
116+
}

0 commit comments

Comments
 (0)