fix: isolate Today summary drafts by account
This commit is contained in:
1 parent
b3a359760c
commit
abc736d32e
2 files changed
+40
-5
No files matched your search
@@ -153,3 +153,21 @@ summary.begin([{{
|
||||
process.stdout.write(JSON.stringify({{text:summary.text()}}));
|
||||
"""
|
||||
assert run_node(script)["text"] == "Today\n- Ship mobile capture"
|
||||
|
||||
|
||||
def test_summary_draft_is_not_visible_after_the_confirmed_account_changes():
|
||||
script = f"""
|
||||
const createSummary = require({json.dumps(str(TODAY_SUMMARY))});
|
||||
const values = new Map();
|
||||
const storage = {{
|
||||
getItem:key => values.has(key) ? values.get(key) : null,
|
||||
setItem:(key,value) => values.set(key,value),
|
||||
removeItem:key => values.delete(key),
|
||||
}};
|
||||
let login='timmy';
|
||||
const summary=createSummary({{storage,getLogin:()=>login}});
|
||||
summary.begin([{{identity:'issue:acme/mobile:41:',title:'Private work',actual_minutes:42}}], []);
|
||||
login='alexander';
|
||||
process.stdout.write(JSON.stringify({{snapshot:summary.snapshot(),text:summary.text()}}));
|
||||
"""
|
||||
assert run_node(script) == {"snapshot": None, "text": ""}
|
||||
Reference in new issue
Block a user