test(claude): cover remove-nonexistent + list live-update for the 95% margin

Two more real branches the account feature left uncovered: removing an
unregistered account (the no-such-account error) and the registry list
rebuilding when a CLI-side registration notifies the shared settings store.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-28 01:19:50 +02:00
co-authored by Claude Opus 4.8
parent da82b48f9b
commit 8a9167bdfd
2 changed files with 13 additions and 1 deletions
@@ -140,6 +140,13 @@ void main() {
expect(published.single.data, {'action': 'login', 'name': 'work', 'dir': '/home/u/.claude-work'});
});
test('remove of an unregistered account → no-such-account error', () async {
wire();
final r = await run(['remove', 'ghost']);
expect(r.ok, isFalse);
expect(r.error?.message, contains('no such account'));
});
test('set/unset with no workspace open error clearly', () async {
wire(cwd: null);
final set = await run(['set', 'work']);