max / makenotwork
1 file changed,
+4 insertions,
-1 deletion
| @@ -619,7 +619,10 @@ impl TestHarness { | |||
| 619 | 619 | ) -> CreatorSetup { | |
| 620 | 620 | let user_id = self.create_creator(username).await; | |
| 621 | 621 | ||
| 622 | - | let slug = format!("{}-proj", username); | |
| 622 | + | // Usernames may contain underscores (valid for accounts) but project | |
| 623 | + | // slugs may not — the slug charset is lowercase letters, digits, and | |
| 624 | + | // hyphens only. Sanitize so a `seller_vis` creator yields `seller-vis-proj`. | |
| 625 | + | let slug = format!("{}-proj", username.replace('_', "-")); | |
| 623 | 626 | let resp = self | |
| 624 | 627 | .client | |
| 625 | 628 | .post_form("/api/projects", &format!("slug={}&title=Test+Project", slug)) |