Change blog title specification
This commit is contained in:
parent
ae7bf2e132
commit
08b7d100fd
@ -565,7 +565,7 @@ pub(crate) mod tests {
|
|||||||
let mut blog1 = Blog::insert(
|
let mut blog1 = Blog::insert(
|
||||||
conn,
|
conn,
|
||||||
NewBlog::new_local(
|
NewBlog::new_local(
|
||||||
"BlogName".to_owned(),
|
"Blog%20Name".to_owned(),
|
||||||
"Blog name".to_owned(),
|
"Blog name".to_owned(),
|
||||||
"This is a small blog".to_owned(),
|
"This is a small blog".to_owned(),
|
||||||
Instance::get_local().unwrap().id,
|
Instance::get_local().unwrap().id,
|
||||||
@ -576,7 +576,7 @@ pub(crate) mod tests {
|
|||||||
let blog2 = Blog::insert(
|
let blog2 = Blog::insert(
|
||||||
conn,
|
conn,
|
||||||
NewBlog::new_local(
|
NewBlog::new_local(
|
||||||
"MyBlog".to_owned(),
|
"My%20Blog".to_owned(),
|
||||||
"My blog".to_owned(),
|
"My blog".to_owned(),
|
||||||
"Welcome to my blog".to_owned(),
|
"Welcome to my blog".to_owned(),
|
||||||
Instance::get_local().unwrap().id,
|
Instance::get_local().unwrap().id,
|
||||||
@ -587,7 +587,7 @@ pub(crate) mod tests {
|
|||||||
let blog3 = Blog::insert(
|
let blog3 = Blog::insert(
|
||||||
conn,
|
conn,
|
||||||
NewBlog::new_local(
|
NewBlog::new_local(
|
||||||
"WhyILikePlume".to_owned(),
|
"Why%20I%20Like%20Plume".to_owned(),
|
||||||
"Why I like Plume".to_owned(),
|
"Why I like Plume".to_owned(),
|
||||||
"In this blog I will explay you why I like Plume so much".to_owned(),
|
"In this blog I will explay you why I like Plume so much".to_owned(),
|
||||||
Instance::get_local().unwrap().id,
|
Instance::get_local().unwrap().id,
|
||||||
@ -682,7 +682,7 @@ pub(crate) mod tests {
|
|||||||
let blog = Blog::insert(
|
let blog = Blog::insert(
|
||||||
conn,
|
conn,
|
||||||
NewBlog::new_local(
|
NewBlog::new_local(
|
||||||
"SomeName".to_owned(),
|
"Some%20Name".to_owned(),
|
||||||
"Some name".to_owned(),
|
"Some name".to_owned(),
|
||||||
"This is some blog".to_owned(),
|
"This is some blog".to_owned(),
|
||||||
Instance::get_local().unwrap().id,
|
Instance::get_local().unwrap().id,
|
||||||
@ -709,7 +709,7 @@ pub(crate) mod tests {
|
|||||||
let b1 = Blog::insert(
|
let b1 = Blog::insert(
|
||||||
conn,
|
conn,
|
||||||
NewBlog::new_local(
|
NewBlog::new_local(
|
||||||
"SomeName".to_owned(),
|
"Some%20Name".to_owned(),
|
||||||
"Some name".to_owned(),
|
"Some name".to_owned(),
|
||||||
"This is some blog".to_owned(),
|
"This is some blog".to_owned(),
|
||||||
Instance::get_local().unwrap().id,
|
Instance::get_local().unwrap().id,
|
||||||
@ -810,7 +810,7 @@ pub(crate) mod tests {
|
|||||||
let blog = Blog::insert(
|
let blog = Blog::insert(
|
||||||
conn,
|
conn,
|
||||||
NewBlog::new_local(
|
NewBlog::new_local(
|
||||||
"SomeName".to_owned(),
|
"Some%20Name".to_owned(),
|
||||||
"Some name".to_owned(),
|
"Some name".to_owned(),
|
||||||
"This is some blog".to_owned(),
|
"This is some blog".to_owned(),
|
||||||
Instance::get_local().unwrap().id,
|
Instance::get_local().unwrap().id,
|
||||||
@ -819,7 +819,7 @@ pub(crate) mod tests {
|
|||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
assert_eq!(Blog::find_by_fqn(conn, "SomeName").unwrap().id, blog.id);
|
assert_eq!(Blog::find_by_fqn(conn, "Some%20Name").unwrap().id, blog.id);
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -833,7 +833,7 @@ pub(crate) mod tests {
|
|||||||
let blog = Blog::insert(
|
let blog = Blog::insert(
|
||||||
conn,
|
conn,
|
||||||
NewBlog::new_local(
|
NewBlog::new_local(
|
||||||
"SomeName".to_owned(),
|
"Some%20Name".to_owned(),
|
||||||
"Some name".to_owned(),
|
"Some name".to_owned(),
|
||||||
"This is some blog".to_owned(),
|
"This is some blog".to_owned(),
|
||||||
Instance::get_local().unwrap().id,
|
Instance::get_local().unwrap().id,
|
||||||
@ -842,7 +842,7 @@ pub(crate) mod tests {
|
|||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
assert_eq!(blog.fqn, "SomeName");
|
assert_eq!(blog.fqn, "Some%20Name");
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -868,7 +868,7 @@ pub(crate) mod tests {
|
|||||||
let b1 = Blog::insert(
|
let b1 = Blog::insert(
|
||||||
conn,
|
conn,
|
||||||
NewBlog::new_local(
|
NewBlog::new_local(
|
||||||
"SomeName".to_owned(),
|
"Some%20Name".to_owned(),
|
||||||
"Some name".to_owned(),
|
"Some name".to_owned(),
|
||||||
"This is some blog".to_owned(),
|
"This is some blog".to_owned(),
|
||||||
Instance::get_local().unwrap().id,
|
Instance::get_local().unwrap().id,
|
||||||
@ -1001,19 +1001,19 @@ pub(crate) mod tests {
|
|||||||
"type": "Image",
|
"type": "Image",
|
||||||
"url": "https://plu.me/aaa.png"
|
"url": "https://plu.me/aaa.png"
|
||||||
},
|
},
|
||||||
"id": "https://plu.me/~/BlogName/",
|
"id": "https://plu.me/~/Blog%20Name/",
|
||||||
"image": {
|
"image": {
|
||||||
"attributedTo": "https://plu.me/@/admin/",
|
"attributedTo": "https://plu.me/@/admin/",
|
||||||
"type": "Image",
|
"type": "Image",
|
||||||
"url": "https://plu.me/bbb.png"
|
"url": "https://plu.me/bbb.png"
|
||||||
},
|
},
|
||||||
"inbox": "https://plu.me/~/BlogName/inbox",
|
"inbox": "https://plu.me/~/Blog%20Name/inbox",
|
||||||
"name": "Blog name",
|
"name": "Blog name",
|
||||||
"outbox": "https://plu.me/~/BlogName/outbox",
|
"outbox": "https://plu.me/~/Blog%20Name/outbox",
|
||||||
"preferredUsername": "BlogName",
|
"preferredUsername": "Blog%20Name",
|
||||||
"publicKey": {
|
"publicKey": {
|
||||||
"id": "https://plu.me/~/BlogName/#main-key",
|
"id": "https://plu.me/~/Blog%20Name/#main-key",
|
||||||
"owner": "https://plu.me/~/BlogName/",
|
"owner": "https://plu.me/~/Blog%20Name/",
|
||||||
"publicKeyPem": blog.public_key
|
"publicKeyPem": blog.public_key
|
||||||
},
|
},
|
||||||
"source": {
|
"source": {
|
||||||
@ -1041,8 +1041,8 @@ pub(crate) mod tests {
|
|||||||
let expected = json!({
|
let expected = json!({
|
||||||
"items": [],
|
"items": [],
|
||||||
"totalItems": 0,
|
"totalItems": 0,
|
||||||
"first": "https://plu.me/~/BlogName/outbox?page=1",
|
"first": "https://plu.me/~/Blog%20Name/outbox?page=1",
|
||||||
"last": "https://plu.me/~/BlogName/outbox?page=0",
|
"last": "https://plu.me/~/Blog%20Name/outbox?page=0",
|
||||||
"type": "OrderedCollection"
|
"type": "OrderedCollection"
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1061,8 +1061,8 @@ pub(crate) mod tests {
|
|||||||
let act = blog.outbox_collection_page(conn, (33, 36))?;
|
let act = blog.outbox_collection_page(conn, (33, 36))?;
|
||||||
|
|
||||||
let expected = json!({
|
let expected = json!({
|
||||||
"next": "https://plu.me/~/BlogName/outbox?page=3",
|
"next": "https://plu.me/~/Blog%20Name/outbox?page=3",
|
||||||
"prev": "https://plu.me/~/BlogName/outbox?page=1",
|
"prev": "https://plu.me/~/Blog%20Name/outbox?page=1",
|
||||||
"items": [],
|
"items": [],
|
||||||
"type": "OrderedCollectionPage"
|
"type": "OrderedCollectionPage"
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user