(t *testing.T)
| 129 | } |
| 130 | |
| 131 | func TestSmartCommitScript(t *testing.T) { |
| 132 | // smartCommitScript runs git-status and git-diff via engine. |
| 133 | // It will work even outside a git repo (commands will error but script won't panic) |
| 134 | result, err := smartCommitScript(context.Background(), map[string]string{}, nil) |
| 135 | // err might be non-nil if not in a git repo, that's ok |
| 136 | _ = err |
| 137 | if result == "" { |
| 138 | t.Error("expected non-empty result from smartCommitScript") |
| 139 | } |
| 140 | if !strings.Contains(result, "Status") { |
| 141 | t.Error("expected 'Status' section in result") |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | func TestReviewChangesScript(t *testing.T) { |
| 146 | result, err := reviewChangesScript(context.Background(), map[string]string{}, nil) |
nothing calls this directly
no test coverage detected