From f8e7eb66645a1f7faac93d19da43b918fd80ca37 Mon Sep 17 00:00:00 2001 From: Dan Caseley Date: Mon, 23 Aug 2021 10:52:04 +0100 Subject: [PATCH] Additional unit test --- test/analytics_x_test.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/analytics_x_test.dart b/test/analytics_x_test.dart index e433a53..0a8286b 100644 --- a/test/analytics_x_test.dart +++ b/test/analytics_x_test.dart @@ -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); + }); }