@@ -129,7 +129,8 @@ async def test_ci_passed_with_awaiting_merge_label_pr_is_merged():
129129
130130 gh = FakeGH (getitem = getitem , getiter = getiter )
131131 await status_change .router .dispatch (event , gh )
132- assert len (gh .post_data ["body" ]) is not None # leaves a comment
132+ expected_body = "Status check is done, and it's a success ✅."
133+ assert gh .post_data ["body" ] == expected_body
133134 assert gh .put_data ["sha" ] == sha # is merged
134135 assert gh .put_data ["merge_method" ] == "squash"
135136 assert (
@@ -196,7 +197,8 @@ async def test_ci_and_check_run_passed_with_no_awaiting_merge_label_pr_is_not_me
196197
197198 gh = FakeGH (getitem = getitem )
198199 await status_change .router .dispatch (event , gh )
199- assert len (gh .post_data ["body" ]) is not None # leaves a comment
200+ expected_body = "Status check is done, and it's a success ✅."
201+ assert gh .post_data ["body" ] == expected_body
200202 assert not hasattr (gh , "put_data" ) # is not merged
201203
202204
@@ -252,7 +254,8 @@ async def test_ci_not_passed_awaiting_merge_label_pr_is_not_merged():
252254
253255 gh = FakeGH (getitem = getitem )
254256 await status_change .router .dispatch (event , gh )
255- assert len (gh .post_data ["body" ]) is not None # leaves a comment
257+ expected_body = "@miss-islington and @Mariatta: Status check is done, and it's a failure ❌."
258+ assert gh .post_data ["body" ] == expected_body
256259 assert not hasattr (gh , "put_data" ) # is not merged
257260
258261
@@ -320,7 +323,8 @@ async def test_ci_passed_and_check_run_failure_awaiting_merge_label_pr_is_not_me
320323
321324 gh = FakeGH (getitem = getitem , getiter = getiter )
322325 await status_change .router .dispatch (event , gh )
323- assert len (gh .post_data ["body" ]) is not None # leaves a comment
326+ expected_body = "@miss-islington and @Mariatta: Status check is done, and it's a failure or timed out ❌."
327+ assert gh .post_data ["body" ] == expected_body
324328 assert not hasattr (gh , "put_data" ) # is not merged
325329
326330
@@ -398,7 +402,8 @@ async def test_automerge_with_check_run_failure():
398402
399403 gh = FakeGH (getitem = getitem , getiter = getiter )
400404 await status_change .router .dispatch (event , gh )
401- assert len (gh .post_data ["body" ]) is not None # leaves a comment
405+ expected_body = "@Mariatta: Status check is done, and it's a failure or timed out ❌."
406+ assert gh .post_data ["body" ] == expected_body
402407 assert not hasattr (gh , "put_data" ) # is not merged
403408
404409
@@ -466,7 +471,8 @@ async def test_ci_passed_and_check_run_pending_awaiting_merge_label_pr_is_not_me
466471
467472 gh = FakeGH (getitem = getitem , getiter = getiter )
468473 await status_change .router .dispatch (event , gh )
469- assert len (gh .post_data ["body" ]) is not None # leaves a comment
474+ expected_body = "@miss-islington and @Mariatta: Status check is done, and it's a failure or timed out ❌."
475+ assert gh .post_data ["body" ] == expected_body
470476 assert not hasattr (gh , "put_data" ) # is not merged
471477
472478
@@ -1342,7 +1348,8 @@ async def test_ci_passed_automerge():
13421348
13431349 gh = FakeGH (getitem = getitem , getiter = getiter )
13441350 await status_change .router .dispatch (event , gh )
1345- assert len (gh .post_data ["body" ]) is not None # leaves a comment
1351+ expected_body = "Status check is done, and it's a success ✅."
1352+ assert gh .post_data ["body" ] == expected_body
13461353 assert gh .put_data ["sha" ] == sha # is merged
13471354 assert gh .put_data ["merge_method" ] == "squash"
13481355 assert (
0 commit comments