Add protected chapter
This commit is contained in:
@@ -13,7 +13,9 @@ fn fixed_secret() -> SecretKey {
|
||||
}
|
||||
|
||||
fn build_hashed(content: &str, tags: Vec<Tag>) -> HashedEvent {
|
||||
EventContent::new(content, tags)
|
||||
EventContent::new()
|
||||
.content(content)
|
||||
.tags(tags)
|
||||
.kind(1)
|
||||
.stamp(1_700_000_000)
|
||||
.own(fixed_secret().public_key())
|
||||
@@ -29,7 +31,7 @@ fn sign_fixture() -> Event {
|
||||
|
||||
#[test]
|
||||
fn pipeline_progresses_through_types() {
|
||||
let content = EventContent::new("hi", Tags::new());
|
||||
let content = EventContent::new().content("hi").tags(Tags::new());
|
||||
let template: EventTemplate = content.kind(1);
|
||||
let stamped: StampedEvent = template.stamp(1_700_000_000);
|
||||
let owned: OwnedEvent = stamped.own(fixed_secret().public_key());
|
||||
|
||||
Reference in New Issue
Block a user