Skip to content

Commit 880081f

Browse files
committed
Tests for canonical search redirects.
1 parent c0c235c commit 880081f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

app/test/frontend/handlers/redirects_test.dart

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,5 +117,19 @@ void main() {
117117
'https://api.flutter.dev/',
118118
);
119119
});
120+
121+
testWithProfile('search canonicalization: topic name', fn: () async {
122+
await expectRedirectResponse(
123+
await issueGet('/packages?q=topic%3Awidgets'),
124+
'/packages?q=topic%3Awidget',
125+
);
126+
});
127+
128+
testWithProfile('search canonicalization: topic shortcut', fn: () async {
129+
await expectRedirectResponse(
130+
await issueGet('/packages?q=%23hash'),
131+
'/packages?q=topic%3Ahash',
132+
);
133+
});
120134
});
121135
}

0 commit comments

Comments
 (0)