import 'package:flutter_test/flutter_test.dart';
import 'package:health_app/core/api_client.dart';

void main() {
  test('AuthExpiredNotifier notifies all current listeners once', () {
    final notifier = AuthExpiredNotifier();
    var first = 0;
    var second = 0;

    final removeFirst = notifier.addListener(() => first++);
    notifier.addListener(() => second++);
    notifier.notify();
    removeFirst();
    notifier.notify();

    expect(first, 1);
    expect(second, 2);
  });
}
