Add shareable multi-board links with paper UI and voice notes.
Boards use /b/<uid> with no invite password; restore renamable columns, recordings, and seeded locale notes, with first column locked.
This commit is contained in:
+9
-8
@@ -8,13 +8,14 @@ from stork.db import Store
|
||||
|
||||
|
||||
def test_store_ranks_by_score_then_alpha(tmp_path: Path) -> None:
|
||||
store = Store(tmp_path / "t.sqlite3")
|
||||
a = store.add_name("first", "Zed", "x")
|
||||
store.add_name("first", "Ann", "x")
|
||||
c = store.add_name("first", "Bo", "x")
|
||||
store.vote(a["id"], "v1", "A", 1)
|
||||
store.vote(c["id"], "v1", "A", 1)
|
||||
store.vote(c["id"], "v2", "B", 1)
|
||||
ranked = store.list_names("first")
|
||||
store = Store(tmp_path / "t.sqlite3", bootstrap_invite="unit-invite")
|
||||
board_id = store.list_boards()[0]["id"]
|
||||
a = store.add_name(board_id, "c1", "Zed", "x")
|
||||
store.add_name(board_id, "c1", "Ann", "x")
|
||||
c = store.add_name(board_id, "c1", "Bo", "x")
|
||||
store.vote(a["id"], "v1", "A", 1, board_id=board_id)
|
||||
store.vote(c["id"], "v1", "A", 1, board_id=board_id)
|
||||
store.vote(c["id"], "v2", "B", 1, board_id=board_id)
|
||||
ranked = store.list_names(board_id, "c1")
|
||||
assert [n["spelling"] for n in ranked] == ["Bo", "Zed", "Ann"]
|
||||
store.close()
|
||||
|
||||
Reference in New Issue
Block a user