Files
psf-memo/psf-memo-db/specs/topic-follow-read.feature
T
Chris Troutner 5183359143 Review and harden topic actions: kill mutation survivors
- Add hardening tests for topic-post-page, profiles, topic-feed-page, and
  topic-query to kill mutation survivors.
- Refresh mutation manifests and Gherkin acceptance-mutation stamps.
- Add topic-actions review summary.

By architect.
2026-08-28 13:13:01 -07:00

43 lines
2.0 KiB
Gherkin

# acceptance-mutation-manifest-begin
# {"version":1,"tested_at":"2026-08-28T20:09:23.829689449Z","feature_name":"Topic Follow Read","feature_path":"/home/trout/work/psf-memo/.worktrees/architect/psf-memo-db/specs/topic-follow-read.feature","background_hash":"bf41600ace5aaae19b01881936ae5ec595b53abbb9829b5f7927f43a830ded38","implementation_hash":"unknown","scenarios":[]}
# acceptance-mutation-manifest-end
# Scenarios: Topic Follow Read - 1, Topic Follow Read - 2
#
# The indexer stores topic follows in the rooms store keyed `${room}:${addr}`
# with type 'follow' and an `unfollow` boolean. The read side exposes whether
# an address follows a topic and the list of addresses that follow a topic.
#
# Fixture "topic-follows":
# rooms store:
# bitcoin:addr-a { room: bitcoin, addr: addr-a, type: follow, unfollow: false }
# bitcoin:addr-b { room: bitcoin, addr: addr-b, type: follow, unfollow: false }
# bitcoin:addr-c { room: bitcoin, addr: addr-c, type: follow, unfollow: true }
# cash:addr-a { room: cash, addr: addr-a, type: follow, unfollow: false }
Feature: Topic Follow Read
Background:
Given a psf-memo-db instance with a rooms store
Given the fixture "topic-follows" is loaded into the rooms store
Scenario Outline: Topic Follow Read - 1 GET /topics/:room/follow/state reports whether an address follows a topic
When the client requests the topic follow state for room <room> and address <addr>
Then the topic follow state reports following <following>
Examples:
| room | addr | following |
| bitcoin | addr-a | true |
| bitcoin | addr-c | false |
| bitcoin | addr-x | false |
| cash | addr-a | true |
Scenario Outline: Topic Follow Read - 2 GET /topics/:room/followers lists the addresses that follow a topic
When the client requests the topic followers list for room <room>
Then the topic followers list contains the addresses <expected>
Examples:
| room | expected |
| bitcoin | addr-a,addr-b |
| cash | addr-a |
| lone | |