Das Timetracking-Tool kann die gearbeiteten Zeiten von Gitea auslesen und in eine CSV-Datei verwandeln.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
520 B
18 lines
520 B
package exporter
|
|
|
|
import (
|
|
"code.gitea.io/sdk/gitea"
|
|
"github.com/stretchr/testify/assert"
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestLocalTrackedTimes_ToTableData(t *testing.T) {
|
|
test_time := time.Date(2017, 01, 21, 10, 00, 00, 00, time.UTC)
|
|
ltt := LocalTrackedTimes{&gitea.TrackedTime{Created: test_time, Time: 100, IssueID: 1, UserID: 2, ID: 3}}
|
|
result := ltt.ToTableData()
|
|
assert.Len(t, result, 1)
|
|
assert.Contains(t, result[0], "1")
|
|
assert.Contains(t, result[0], "2")
|
|
assert.Contains(t, result[0], "21.01.2017 10:00")
|
|
}
|
|
|