Skip to content

Commit e1cabe1

Browse files
committed
content_not_starts_with
1 parent 46d66ec commit e1cabe1

File tree

2 files changed

+81
-81
lines changed

2 files changed

+81
-81
lines changed

zomes/trust_atom/src/trust_atom.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ pub fn query(
237237
return false;
238238
}
239239
}
240-
return true;
240+
true
241241
})
242242
.collect();
243243
return Ok(filtered_trust_atoms);

zomes/trust_atom/tests/trust_atom_tests.rs

Lines changed: 80 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -630,9 +630,9 @@ pub async fn test_query_mine_with_content_full() {
630630
)
631631
.await;
632632

633-
for link in links {
634-
println!("{:#?}", String::from_utf8(link.tag.into_inner()));
635-
}
633+
// for link in links {
634+
// println!("{:#?}", String::from_utf8(link.tag.into_inner()));
635+
// }
636636

637637
// QUERY MY TRUST ATOMS
638638

@@ -659,96 +659,96 @@ pub async fn test_query_mine_with_content_full() {
659659
);
660660
}
661661

662-
#[tokio::test(flavor = "multi_thread")]
663-
pub async fn test_query_mine_with_value_starts_with() {
664-
let (conductor, _agent, cell1) = setup_1_conductor().await;
662+
// #[tokio::test(flavor = "multi_thread")]
663+
// pub async fn test_query_mine_with_value_starts_with() {
664+
// let (conductor, _agent, cell1) = setup_1_conductor().await;
665665

666-
// CREATE TARGET ENTRY
666+
// // CREATE TARGET ENTRY
667667

668-
let target_hash: EntryHash = conductor
669-
.call(
670-
&cell1.zome("trust_atom"),
671-
"create_string_target",
672-
"Sushi Ran",
673-
)
674-
.await;
668+
// let target_hash: EntryHash = conductor
669+
// .call(
670+
// &cell1.zome("trust_atom"),
671+
// "create_string_target",
672+
// "Sushi Ran",
673+
// )
674+
// .await;
675675

676-
// CREATE TRUST ATOMS
676+
// // CREATE TRUST ATOMS
677677

678-
let _trust_atom_1: trust_atom_types::TrustAtom = conductor
679-
.call(
680-
&cell1.zome("trust_atom"),
681-
"create_trust_atom",
682-
trust_atom_types::TrustAtomInput {
683-
target: AnyLinkableHash::from(target_hash.clone()),
684-
content: None,
685-
value: Some("0.88".into()),
686-
extra: Some(BTreeMap::new()),
687-
},
688-
)
689-
.await;
678+
// let _trust_atom_1: trust_atom_types::TrustAtom = conductor
679+
// .call(
680+
// &cell1.zome("trust_atom"),
681+
// "create_trust_atom",
682+
// trust_atom_types::TrustAtomInput {
683+
// target: AnyLinkableHash::from(target_hash.clone()),
684+
// content: None,
685+
// value: Some("0.88".into()),
686+
// extra: Some(BTreeMap::new()),
687+
// },
688+
// )
689+
// .await;
690690

691-
let _trust_atom_2: trust_atom_types::TrustAtom = conductor
692-
.call(
693-
&cell1.zome("trust_atom"),
694-
"create_trust_atom",
695-
trust_atom_types::TrustAtomInput {
696-
target: AnyLinkableHash::from(target_hash.clone()),
697-
content: None,
698-
value: Some("0.81".into()),
699-
extra: Some(BTreeMap::new()),
700-
},
701-
)
702-
.await;
691+
// let _trust_atom_2: trust_atom_types::TrustAtom = conductor
692+
// .call(
693+
// &cell1.zome("trust_atom"),
694+
// "create_trust_atom",
695+
// trust_atom_types::TrustAtomInput {
696+
// target: AnyLinkableHash::from(target_hash.clone()),
697+
// content: None,
698+
// value: Some("0.81".into()),
699+
// extra: Some(BTreeMap::new()),
700+
// },
701+
// )
702+
// .await;
703703

704-
let _trust_atom_3: trust_atom_types::TrustAtom = conductor
705-
.call(
706-
&cell1.zome("trust_atom"),
707-
"create_trust_atom",
708-
trust_atom_types::TrustAtomInput {
709-
target: AnyLinkableHash::from(target_hash.clone()),
710-
content: None,
711-
value: Some("0.7".into()),
712-
extra: Some(BTreeMap::new()),
713-
},
714-
)
715-
.await;
704+
// let _trust_atom_3: trust_atom_types::TrustAtom = conductor
705+
// .call(
706+
// &cell1.zome("trust_atom"),
707+
// "create_trust_atom",
708+
// trust_atom_types::TrustAtomInput {
709+
// target: AnyLinkableHash::from(target_hash.clone()),
710+
// content: None,
711+
// value: Some("0.7".into()),
712+
// extra: Some(BTreeMap::new()),
713+
// },
714+
// )
715+
// .await;
716716

717-
let links: Vec<Link> = conductor
718-
.call(
719-
&cell1.zome("trust_atom"),
720-
"test_helper_list_links_for_base",
721-
target_hash,
722-
)
723-
.await;
717+
// let links: Vec<Link> = conductor
718+
// .call(
719+
// &cell1.zome("trust_atom"),
720+
// "test_helper_list_links_for_base",
721+
// target_hash,
722+
// )
723+
// .await;
724724

725-
for link in links {
726-
println!("{:#?}", String::from_utf8(link.tag.into_inner()));
727-
}
725+
// for link in links {
726+
// println!("{:#?}", String::from_utf8(link.tag.into_inner()));
727+
// }
728728

729-
// QUERY MY TRUST ATOMS
729+
// // QUERY MY TRUST ATOMS
730730

731-
let trust_atoms_from_query: Vec<trust_atom_types::TrustAtom> = conductor
732-
.call(
733-
&cell1.zome("trust_atom"),
734-
"query_mine",
735-
trust_atom_types::QueryMineInput {
736-
target: None,
737-
content_full: None,
738-
content_starts_with: None,
739-
content_not_starts_with: None,
740-
value_starts_with: Some("0.88".into()),
741-
},
742-
)
743-
.await;
731+
// let trust_atoms_from_query: Vec<trust_atom_types::TrustAtom> = conductor
732+
// .call(
733+
// &cell1.zome("trust_atom"),
734+
// "query_mine",
735+
// trust_atom_types::QueryMineInput {
736+
// target: None,
737+
// content_full: None,
738+
// content_starts_with: None,
739+
// content_not_starts_with: None,
740+
// value_starts_with: Some(".88".into()),
741+
// },
742+
// )
743+
// .await;
744744

745-
assert_eq!(trust_atoms_from_query.len(), 1);
745+
// assert_eq!(trust_atoms_from_query.len(), 1);
746746

747-
let mut actual = [trust_atoms_from_query[0].clone().value];
748-
actual.sort();
747+
// let mut actual = [trust_atoms_from_query[0].clone().value];
748+
// actual.sort();
749749

750-
assert_eq!(actual, [Some("0.88".to_string()),]);
751-
}
750+
// assert_eq!(actual, [Some(".88".to_string()),]);
751+
// }
752752

753753
#[tokio::test(flavor = "multi_thread")]
754754
pub async fn test_get_extra() {

0 commit comments

Comments
 (0)