Function goose_eggs::drupal::search [−][src]
pub async fn search<'a>(
user: &GooseUser,
params: &'a SearchParams<'a>
) -> Result<String, GooseTaskError>
Expand description
Perform a simple Drupal-powered search.
In the following example, SearchParams::keys
is used to configure the keys
being searched for, and SearchParams::update_title
is used to validate that
the page with the search form has a title containing Search
.
Example
use goose::prelude::*; task!(search); async fn search(user: &GooseUser) -> GooseTaskResult { // Use the default search form to search for "foo", validating that the // search page has a title of Search. let search_params = goose_eggs::drupal::SearchParams::keys("foo").update_title("Search"); // Perform the actual search. let _search_results = goose_eggs::drupal::search(&user, &search_params).await?; Ok(()) }