Skip to content

Commit 9d09f3c

Browse files
committed
Add unit test for PFQueryState.includeKeys.
1 parent f9c5770 commit 9d09f3c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Tests/Unit/QueryStateUnitTests.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,15 @@ - (void)testIncludeKeys {
200200
XCTAssertEqualObjects(state.includedKeys, includedKeys);
201201
}
202202

203+
- (void)testIncludeMultipleKeys {
204+
PFMutableQueryState *state = [[PFMutableQueryState alloc] initWithParseClassName:@"Yarr"];
205+
[state includeKeys:@[ @"a", @"b", @"c" ]];
206+
[state includeKey:@"a"];
207+
208+
NSSet *includedKeys = PF_SET(@"a", @"b", @"c");
209+
XCTAssertEqualObjects(state.includedKeys, includedKeys);
210+
}
211+
203212
- (void)testSelectKeys {
204213
PFMutableQueryState *state = [[PFMutableQueryState alloc] initWithParseClassName:@"Yarr"];
205214

0 commit comments

Comments
 (0)