feat(market): one-time community-rules gate before joining the market, publishing or messaging

This commit is contained in:
vjrj 2026-07-13 00:52:39 +02:00
parent a7e10eba7a
commit 5d25f65f76
7 changed files with 311 additions and 1 deletions

View file

@ -0,0 +1,22 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:tane/services/onboarding_store.dart';
import '../support/test_support.dart';
void main() {
test('market rules start unaccepted and stay accepted once marked', () async {
final store = OnboardingStore(InMemorySecretStore());
expect(await store.marketRulesAccepted(), isFalse);
await store.markMarketRulesAccepted();
expect(await store.marketRulesAccepted(), isTrue);
});
test('market-rules flag is independent of the intro flag', () async {
final store = OnboardingStore(InMemorySecretStore());
await store.markIntroSeen();
expect(await store.introSeen(), isTrue);
expect(await store.marketRulesAccepted(), isFalse);
});
}