diff --git a/tests/50federation/51transactions.pl b/tests/50federation/51transactions.pl index 4723f25ea..12c2631e4 100644 --- a/tests/50federation/51transactions.pl +++ b/tests/50federation/51transactions.pl @@ -64,6 +64,14 @@ my $room = $rooms[0]; + my $first_event = $room->create_and_insert_event( + type => "m.room.message", + + sender => $user_id, + content => { + body => "Message 1", + }, + ); my $bad_event = $room->create_and_insert_event( type => "m.room.message", @@ -75,11 +83,25 @@ }, ); - my @pdus = ( $bad_event ); + my $third_event = $room->create_and_insert_event( + type => "m.room.message", + + sender => $user_id, + content => { + body => "Message 1", + }, + ); + + my @pdus = ( $first_event, $bad_event, $third_event ); + print "meowwo"; + print @pdus; # Send the transaction to the client and expect a fail $outbound_client->send_transaction( pdus => \@pdus, destination => $creator->server_name, - )->main::expect_m_bad_json; + )->then( sub { + my ( $body ) = @_; + assert_json_keys( $body->{pdus}, map { $room->id_for_event( $_ ) } @pdus[0, 2] ) + }); };