@@ -129,7 +129,8 @@ async def test_ci_passed_with_awaiting_merge_label_pr_is_merged():
129
129
130
130
gh = FakeGH (getitem = getitem , getiter = getiter )
131
131
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
133
134
assert gh .put_data ["sha" ] == sha # is merged
134
135
assert gh .put_data ["merge_method" ] == "squash"
135
136
assert (
@@ -196,7 +197,8 @@ async def test_ci_and_check_run_passed_with_no_awaiting_merge_label_pr_is_not_me
196
197
197
198
gh = FakeGH (getitem = getitem )
198
199
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
200
202
assert not hasattr (gh , "put_data" ) # is not merged
201
203
202
204
@@ -252,7 +254,8 @@ async def test_ci_not_passed_awaiting_merge_label_pr_is_not_merged():
252
254
253
255
gh = FakeGH (getitem = getitem )
254
256
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
256
259
assert not hasattr (gh , "put_data" ) # is not merged
257
260
258
261
@@ -320,7 +323,8 @@ async def test_ci_passed_and_check_run_failure_awaiting_merge_label_pr_is_not_me
320
323
321
324
gh = FakeGH (getitem = getitem , getiter = getiter )
322
325
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
324
328
assert not hasattr (gh , "put_data" ) # is not merged
325
329
326
330
@@ -398,7 +402,8 @@ async def test_automerge_with_check_run_failure():
398
402
399
403
gh = FakeGH (getitem = getitem , getiter = getiter )
400
404
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
402
407
assert not hasattr (gh , "put_data" ) # is not merged
403
408
404
409
@@ -466,7 +471,8 @@ async def test_ci_passed_and_check_run_pending_awaiting_merge_label_pr_is_not_me
466
471
467
472
gh = FakeGH (getitem = getitem , getiter = getiter )
468
473
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
470
476
assert not hasattr (gh , "put_data" ) # is not merged
471
477
472
478
@@ -1342,7 +1348,8 @@ async def test_ci_passed_automerge():
1342
1348
1343
1349
gh = FakeGH (getitem = getitem , getiter = getiter )
1344
1350
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
1346
1353
assert gh .put_data ["sha" ] == sha # is merged
1347
1354
assert gh .put_data ["merge_method" ] == "squash"
1348
1355
assert (
0 commit comments