Skip to content

Commit

Permalink
update test expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
denrase committed Feb 13, 2024
1 parent b05f743 commit e4dc8d7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions flutter/test/sentry_navigator_observer_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ void main() {
final secondRoute = route(RouteSettings(name: 'Second Route'));

final hub = _MockHub();
final span = getMockSentryTracer();
final span = getMockSentryTracer(finished: false);
when(span.context).thenReturn(SentrySpanContext(operation: 'op'));
when(span.status).thenReturn(null);
_whenAnyStart(hub, span);
Expand All @@ -279,7 +279,7 @@ void main() {
final currentRoute = route(RouteSettings(name: 'Current Route'));

final hub = _MockHub();
final span = getMockSentryTracer();
final span = getMockSentryTracer(finished: false);
when(span.context).thenReturn(SentrySpanContext(operation: 'op'));
when(span.status).thenReturn(null);
_whenAnyStart(hub, span);
Expand Down Expand Up @@ -833,9 +833,10 @@ class _MockHub extends MockHub {
}
}

ISentrySpan getMockSentryTracer({String? name}) {
ISentrySpan getMockSentryTracer({String? name, bool? finished}) {
final tracer = MockSentryTracer();
when(tracer.name).thenReturn(name ?? 'name');
when(tracer.finished).thenReturn(finished ?? true);
return tracer;
}

Expand Down

0 comments on commit e4dc8d7

Please sign in to comment.