Skip to content

Commit b2c89b7

Browse files
committed
test: Add example data for User
1 parent 4f9fe3c commit b2c89b7

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test/example_data.dart

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,27 @@ final Uri realmUrl = Uri.parse('https://chat.example/');
77
const String recentZulipVersion = '6.1';
88
const int recentZulipFeatureLevel = 164;
99

10+
User user({int? userId, String? fullName}) {
11+
return User(
12+
userId: userId ?? 123, // TODO generate example IDs
13+
deliveryEmailStaleDoNotUse: '[email protected]',
14+
email: '[email protected]', // TODO generate example emails
15+
fullName: fullName ?? 'A user',// TODO generate example names
16+
dateJoined: '2023-04-28',
17+
isActive: true,
18+
isOwner: false,
19+
isAdmin: false,
20+
isGuest: false,
21+
isBillingAdmin: false,
22+
isBot: false,
23+
role: 400,
24+
timezone: 'UTC',
25+
avatarUrl: null,
26+
avatarVersion: 0,
27+
profileData: null,
28+
);
29+
}
30+
1031
final Account selfAccount = Account(
1132
id: 1001,
1233
realmUrl: realmUrl,

0 commit comments

Comments
 (0)