aboutsummaryrefslogtreecommitdiffstats
path: root/commands/user_create_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/user_create_test.go')
-rw-r--r--commands/user_create_test.go16
1 files changed, 9 insertions, 7 deletions
diff --git a/commands/user_create_test.go b/commands/user_create_test.go
index 223e7ec3..08958344 100644
--- a/commands/user_create_test.go
+++ b/commands/user_create_test.go
@@ -1,21 +1,25 @@
package commands
import (
- "path/filepath"
"strings"
"testing"
"github.com/stretchr/testify/require"
)
+const (
+ testUserName = "John Doe"
+ testUserEmail = "jdoe@example.com"
+)
+
func newTestEnvAndUser(t *testing.T) (*testEnv, string) {
t.Helper()
testEnv := newTestEnv(t)
opts := createUserOptions{
- name: "John Doe",
- email: "jdoe@example.com",
+ name: testUserName,
+ email: testUserEmail,
avatarURL: "",
nonInteractive: true,
}
@@ -29,8 +33,6 @@ func newTestEnvAndUser(t *testing.T) (*testEnv, string) {
}
func TestUserCreateCommand(t *testing.T) {
- testEnv, userID := newTestEnvAndUser(t)
-
- require.FileExists(t, filepath.Join(testEnv.cwd, ".git", "refs", "identities", userID))
- require.FileExists(t, filepath.Join(testEnv.cwd, ".git", "git-bug", "identity-cache"))
+ _, userID := newTestEnvAndUser(t)
+ require.Regexp(t, "[0-9a-f]{64}", userID)
}