Skip to content

Commit

Permalink
fix: analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOneWithTheBraid committed Dec 7, 2024
1 parent 70c2de8 commit b323617
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions test/commands_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -536,15 +536,18 @@ void main() {
FakeMatrixApi.calledEndpoints.clear();
final stdout = StringBuffer();
await client.parseAndRunCommand(
null, '/dm @alice:example.com --no-encryption',
stdout: stdout);
null,
'/dm @alice:example.com --no-encryption',
stdout: stdout,
);
expect(
json.decode(
FakeMatrixApi.calledEndpoints['/client/v3/createRoom']?.first),
FakeMatrixApi.calledEndpoints['/client/v3/createRoom']?.first,
),
{
'invite': ['@alice:example.com'],
'is_direct': true,
'preset': 'trusted_private_chat'
'preset': 'trusted_private_chat',
});
expect(
(jsonDecode(stdout.toString()) as DefaultCommandOutput).rooms?.first,
Expand All @@ -556,12 +559,16 @@ void main() {
FakeMatrixApi.calledEndpoints.clear();
final stdout = StringBuffer();
await client.parseAndRunCommand(
null, '/create @alice:example.com --no-encryption',
stdout: stdout);
null,
'/create @alice:example.com --no-encryption',
stdout: stdout,
);
expect(
json.decode(
FakeMatrixApi.calledEndpoints['/client/v3/createRoom']?.first),
{'preset': 'private_chat'});
json.decode(
FakeMatrixApi.calledEndpoints['/client/v3/createRoom']?.first,
),
{'preset': 'private_chat'},
);
expect(
(jsonDecode(stdout.toString()) as DefaultCommandOutput).rooms?.first,
'!1234:fakeServer.notExisting',
Expand Down

0 comments on commit b323617

Please sign in to comment.