Skip to content

Commit 28a231d

Browse files
committed
emit before/after data
1 parent 28662b9 commit 28a231d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

app/lib/admin/actions/package_publisher_set.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ final packagePublisherSet = AdminAction(
5656
}
5757

5858
final pkg = await packageBackend.lookupPackage(packageName);
59-
return {'publisherId': pkg!.publisherId};
59+
return {
60+
'before': {'publisherId': currentPublisherId},
61+
'after': {'publisherId': pkg!.publisherId},
62+
};
6063
},
6164
);

app/test/admin/package_actions_test.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ void main() {
8686
arguments: {'package': 'oxygen', 'publisher': 'example.com'},
8787
),
8888
);
89-
expect(rs.output, {'publisherId': 'example.com'});
89+
expect(rs.output, {
90+
'before': {'publisherId': null},
91+
'after': {'publisherId': 'example.com'},
92+
});
9093
},
9194
);
9295
});

0 commit comments

Comments
 (0)