Skip to content

Commit

Permalink
Add assertion that the default field is present
Browse files Browse the repository at this point in the history
Relates to matrix-org/synapse#13904 (comment)

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>
  • Loading branch information
deepbluev7 committed Sep 28, 2022
1 parent 14b0a02 commit 70f5835
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/61push/02add_rules.pl
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ sub check_add_push_rule

log_if_fail "Rule", $rule;

assert_json_keys( $rule, qw( rule_id actions enabled ) );
assert_json_keys( $rule, qw( rule_id actions enabled default ) );

assert_json_boolean( $rule->{enabled} );

assert_json_boolean( $rule->{default} );

assert_eq( $rule->{rule_id}, $rule_id );
};

Expand Down

0 comments on commit 70f5835

Please sign in to comment.