(t *testing.T)
| 50 | } |
| 51 | |
| 52 | func TestNewWithConfig(t *testing.T) { |
| 53 | app := NewWithConfig(Config{ |
| 54 | DefaultDataDir: "test_dir", |
| 55 | DefaultEncryptionEnv: "test_encryption_env", |
| 56 | HideStartBanner: true, |
| 57 | }) |
| 58 | |
| 59 | if app == nil { |
| 60 | t.Fatal("Expected initialized PocketBase instance, got nil") |
| 61 | } |
| 62 | |
| 63 | if app.RootCmd == nil { |
| 64 | t.Fatal("Expected RootCmd to be initialized, got nil") |
| 65 | } |
| 66 | |
| 67 | if app.App == nil { |
| 68 | t.Fatal("Expected App to be initialized, got nil") |
| 69 | } |
| 70 | |
| 71 | if app.hideStartBanner != true { |
| 72 | t.Fatal("Expected app.hideStartBanner to be true, got false") |
| 73 | } |
| 74 | |
| 75 | if app.DataDir() != "test_dir" { |
| 76 | t.Fatalf("Expected app.DataDir() %q, got %q", "test_dir", app.DataDir()) |
| 77 | } |
| 78 | |
| 79 | if app.EncryptionEnv() != "test_encryption_env" { |
| 80 | t.Fatalf("Expected app.EncryptionEnv() %q, got %q", "test_encryption_env", app.EncryptionEnv()) |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | func TestNewWithConfigAndFlags(t *testing.T) { |
| 85 | // copy os.Args |
nothing calls this directly
no test coverage detected
searching dependent graphs…