713593da4e
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>
25 lines
476 B
Go
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))
|
|
})
|
|
}
|