Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/lib/admin/actions/moderation_case_resolve.dart
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ Closes the moderation case and updates the status based on the actions logged on
}

mc.status = status!;
mc.grounds = grounds;
mc.violation = violation;
mc.reason = reason;
tx.insert(mc);
Expand Down
5 changes: 5 additions & 0 deletions app/test/admin/moderation_case_resolve_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ void main() {
fn: () async {
final mc = await _prepare(apply: null);
expect(await _close(mc.caseId), 'no-action');
final closed = await adminBackend.lookupModerationCase(mc.caseId);
expect(closed!.grounds, ModerationGrounds.none);
},
);

Expand Down Expand Up @@ -119,6 +121,9 @@ void main() {
await _close(mc.caseId, reason: 'The package violated our policy.'),
'moderation-applied',
);
final closed = await adminBackend.lookupModerationCase(mc.caseId);
expect(closed!.grounds, ModerationGrounds.policy);
expect(closed.violation, 'scope_of_platform_service');

// cleanup does remove case after the threshold is reached
await _verifyCaseExistence(mc.caseId, true);
Expand Down
2 changes: 1 addition & 1 deletion app/test/admin/moderation_case_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ void main() {
'isSubjectOwner': false,
'url': null,
'status': 'no-action',
'grounds': null,
'grounds': 'none',
'violation': 'none',
'reason': null,
'appealedCaseId': null,
Expand Down
Loading