Skip to content

Commit 43261b0

Browse files
authored
Fix CountAggregator test (#400)
Fix Mocked request propagation and clean up requests
1 parent 2fe2ff9 commit 43261b0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Example/Tests/Classes/LPCountAggregatorTest.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#import "LPRequest.h"
3131
#import <Leanplum/LPRequestSender.h>
3232
#import <Leanplum/LPNetworkConstants.h>
33+
#import "LeanplumHelper.h"
3334

3435
/**
3536
* Expose private class methods
@@ -55,6 +56,7 @@ - (void)setUp {
5556

5657
- (void)tearDown {
5758
[super tearDown];
59+
[LeanplumHelper clean_up];
5860
}
5961

6062
- (void)test_incrementDisabledCount {
@@ -148,6 +150,8 @@ - (void)test_sendAllCounts {
148150
id lpRequestSenderMock = OCMClassMock([LPRequestSender class]);
149151
OCMStub([lpRequestSenderMock sendEventually:lpRequestMockVerified sync:[OCMArg any]]);
150152
[lpRequestSenderMock sendEventually:lpRequestMockVerified sync:[OCMArg any]];
153+
[lpRequestSenderMock stopMocking];
154+
[lpRequestMock stopMocking];
151155
}
152156

153157
@end

0 commit comments

Comments
 (0)