Skip to content

Commit

Permalink
Additional unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Caseley committed Aug 23, 2021
1 parent 3851d93 commit f8e7eb6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/analytics_x_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,10 @@ void main() {
expect(fakeVendor.handleActionWasCalledXTimes, 0);
expect(fakeVendor2.handleActionWasCalledXTimes, 1);
});

test('Vendor handleAction is not called when invokeAction is called with non-existent vendorId', () async {
await ax.init([fakeVendor]);
await ax.invokeAction(FakeAction("potato"), ['NonExistentVendorId']);
expect(fakeVendor.handleActionWasCalledXTimes, 0);
});
}

0 comments on commit f8e7eb6

Please sign in to comment.