photoprism/pkg/txt/ntimes_test.go
Michael Mayer 713593da4e Auth: Add CLI command to create access tokens for apps #782 #808 #3943
You can now run "photoprism auth add" to create new client access tokens
that allow external applications to use the built-in REST API.

Signed-off-by: Michael Mayer <michael@photoprism.app>
2024-01-05 16:31:07 +01:00

25 lines
476 B
Go

package txt
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestNTimes(t *testing.T) {
t.Run("-2", func(t *testing.T) {
assert.Equal(t, "", NTimes(-2))
})
t.Run("-1", func(t *testing.T) {
assert.Equal(t, "", NTimes(-1))
})
t.Run("0", func(t *testing.T) {
assert.Equal(t, "", NTimes(0))
})
t.Run("1", func(t *testing.T) {
assert.Equal(t, "", NTimes(1))
})
t.Run("999", func(t *testing.T) {
assert.Equal(t, "999 times", NTimes(999))
})
}