Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix tests

  • Loading branch information...
commit 0aac72d169435a5fe645a9e3da446e0a71200924 1 parent 8bfe05f
@neilrahilly neilrahilly authored
Showing with 14 additions and 6 deletions.
  1. +14 −6 HelloMixpanel/HelloMixpanelTests/HelloMixpanelTests.m
View
20 HelloMixpanel/HelloMixpanelTests/HelloMixpanelTests.m
@@ -118,13 +118,21 @@ - (void)testTrack
NSDictionary *e = self.mixpanel.eventsQueue.lastObject;
STAssertEquals([e objectForKey:@"event"], @"Something Happened", @"incorrect event name");
NSDictionary *p = [e objectForKey:@"properties"];
- STAssertTrue(p.count == 8, @"incorrect number of properties. got %d instead of 8", p.count);
+ STAssertTrue(p.count == 14, @"incorrect number of properties");
+
+ STAssertNotNil([p objectForKey:@"$app_version"], @"$app_version not set");
+ STAssertNotNil([p objectForKey:@"$lib_version"], @"$lib_version not set");
+ STAssertEqualObjects([p objectForKey:@"$manufacturer"], @"Apple", @"incorrect $manufacturer");
+ STAssertNotNil([p objectForKey:@"$model"], @"$model not set");
+ STAssertNotNil([p objectForKey:@"$os"], @"$os not set");
+ STAssertNotNil([p objectForKey:@"$os_version"], @"$os_version not set");
+ STAssertNotNil([p objectForKey:@"$screen_height"], @"$screen_height not set");
+ STAssertNotNil([p objectForKey:@"$screen_width"], @"$screen_width not set");
STAssertNotNil([p objectForKey:@"distinct_id"], @"distinct_id not set");
- STAssertEqualObjects([p objectForKey:@"token"], TEST_TOKEN, @"incorrect token");
- STAssertEqualObjects([p objectForKey:@"mp_lib"], @"iphone", @"incorrect mp_lib");
STAssertNotNil([p objectForKey:@"mp_device_model"], @"mp_device_model not set");
- STAssertNotNil([p objectForKey:@"$ios_version"], @"$ios_version not set");
- STAssertNotNil([p objectForKey:@"$ios_app_version"], @"$ios_app_version not set");
+ STAssertEqualObjects([p objectForKey:@"mp_lib"], @"iphone", @"incorrect mp_lib");
+ STAssertNotNil([p objectForKey:@"time"], @"time not set");
+ STAssertEqualObjects([p objectForKey:@"token"], TEST_TOKEN, @"incorrect token");
}
- (void)testTrackProperties
@@ -139,7 +147,7 @@ - (void)testTrackProperties
NSDictionary *e = self.mixpanel.eventsQueue.lastObject;
STAssertEquals([e objectForKey:@"event"], @"Something Happened", @"incorrect event name");
p = [e objectForKey:@"properties"];
- STAssertTrue(p.count == 11, @"incorrect number of properties. got %d instead of 11", p.count, 9);
+ STAssertTrue(p.count == 17, @"incorrect number of properties");
}
- (void)testTrackWithCustomDistinctIdAndToken
Please sign in to comment.
Something went wrong with that request. Please try again.