test(claude): cover the per-repo account branches to clear the 95% gate
Adds the missing-line coverage the epic's new code left uncovered: Account / DetectedAccount value equality, the set/unset no-workspace error branches, the login dialog's escape-to-close, and the settings controls' live-update / no-workspace / duplicate-add / re-login paths. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -140,6 +140,16 @@ void main() {
|
||||
expect(published.single.data, {'action': 'login', 'name': 'work', 'dir': '/home/u/.claude-work'});
|
||||
});
|
||||
|
||||
test('set/unset with no workspace open error clearly', () async {
|
||||
wire(cwd: null);
|
||||
final set = await run(['set', 'work']);
|
||||
expect(set.ok, isFalse);
|
||||
expect(set.error?.message, contains('no workspace'));
|
||||
final unset = await run(['unset']);
|
||||
expect(unset.ok, isFalse);
|
||||
expect(unset.error?.message, contains('no workspace'));
|
||||
});
|
||||
|
||||
test('unknown action → userError listing the verbs', () async {
|
||||
wire();
|
||||
final r = await run(['frobnicate']);
|
||||
|
||||
Reference in New Issue
Block a user