import 'package:flutter_test/flutter_test.dart';
import 'package:tane/services/profile_store.dart';

import '../support/test_support.dart';

void main() {
  late ProfileStore store;
  setUp(() => store = ProfileStore(InMemorySecretStore()));

  test('defaults are empty', () async {
    expect(await store.name(), '');
    expect(await store.about(), '');
  });

  test('save then read back, trimmed', () async {
    await store.save(name: '  Alicia  ', about: '  tomate rosa ');
    expect(await store.name(), 'Alicia');
    expect(await store.about(), 'tomate rosa');
  });
}
