-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
85 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
#import <XCTest/XCTest.h> | ||
|
||
#import "BugsnagUser.h" | ||
#import "BugsnagEvent.h" | ||
|
||
@interface BugsnagUserTest : XCTestCase | ||
@end | ||
|
@@ -45,4 +46,19 @@ - (void)testPayloadSerialisation { | |
XCTAssertEqualObjects(@"Tom Bombadil", rootNode[@"name"]); | ||
} | ||
|
||
- (void)testUserEvent { | ||
// Setup | ||
BugsnagEvent *event = [[BugsnagEvent alloc] initWithKSReport:@{ | ||
@"user.metaData": @{ | ||
@"user": @{ | ||
@"id": @"123", | ||
@"name": @"Jane Smith", | ||
@"email": @"[email protected]", | ||
} | ||
}}]; | ||
XCTAssertEqualObjects(@"123", event.user.userId); | ||
XCTAssertEqualObjects(@"Jane Smith", event.user.name); | ||
XCTAssertEqualObjects(@"[email protected]", event.user.emailAddress); | ||
} | ||
|
||
@end |