mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-23 03:11:32 +00:00
Addressing PR comments.
This commit is contained in:
parent
1e6b3fbf27
commit
c72d5e88d5
1 changed files with 3 additions and 11 deletions
|
@ -698,7 +698,7 @@ test("Report a post", async () => {
|
||||||
() =>
|
() =>
|
||||||
listReports(beta).then(p =>
|
listReports(beta).then(p =>
|
||||||
p.reports.find(r => {
|
p.reports.find(r => {
|
||||||
return checkReportName(r, gammaReport);
|
return checkPostReportName(r, gammaReport);
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
res => !!res,
|
res => !!res,
|
||||||
|
@ -718,15 +718,7 @@ test("Report a post", async () => {
|
||||||
() =>
|
() =>
|
||||||
listReports(alpha).then(p =>
|
listReports(alpha).then(p =>
|
||||||
p.reports.find(r => {
|
p.reports.find(r => {
|
||||||
switch (r.type_) {
|
return checkPostReportName(r, gammaReport);
|
||||||
case "Post":
|
|
||||||
return (
|
|
||||||
r.post_report.original_post_name ===
|
|
||||||
gammaReport.original_post_name
|
|
||||||
);
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
res => !!res,
|
res => !!res,
|
||||||
|
@ -833,7 +825,7 @@ test("Rewrite markdown links", async () => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
function checkReportName(rcv: ReportCombinedView, report: PostReport) {
|
function checkPostReportName(rcv: ReportCombinedView, report: PostReport) {
|
||||||
switch (rcv.type_) {
|
switch (rcv.type_) {
|
||||||
case "Post":
|
case "Post":
|
||||||
return rcv.post_report.original_post_name === report.original_post_name;
|
return rcv.post_report.original_post_name === report.original_post_name;
|
||||||
|
|
Loading…
Reference in a new issue