mirror of
https://github.com/dathere/ckanaction.git
synced 2026-05-20 01:44:16 +00:00
fix: update docs and errors with CKANError
This commit is contained in:
parent
677475f750
commit
e5d4f8d442
5 changed files with 18 additions and 11 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use ckanaction::CKAN;
|
||||
use ckanaction::{CKAN, CKANError};
|
||||
|
||||
const CKAN_API_TOKEN: &str = "";
|
||||
const CKAN_URL: &str = "";
|
||||
|
|
@ -12,7 +12,7 @@ pub async fn get_ckan_builder() -> CKAN {
|
|||
|
||||
#[tokio::test]
|
||||
#[ignore = "Set values for const at top of tests file locally."]
|
||||
async fn status_show() -> Result<(), Box<dyn std::error::Error>> {
|
||||
async fn status_show() -> Result<(), CKANError> {
|
||||
let ckan = get_ckan_builder().await;
|
||||
let response = ckan.status_show().await?;
|
||||
assert!(response.is_object());
|
||||
|
|
@ -28,7 +28,7 @@ async fn status_show() -> Result<(), Box<dyn std::error::Error>> {
|
|||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn print_ckan_struct_with_debug() -> Result<(), Box<dyn std::error::Error>> {
|
||||
async fn print_ckan_struct_with_debug() -> Result<(), CKANError> {
|
||||
let ckan = get_ckan_builder().await;
|
||||
assert_eq!(format!("{ckan:?}"), r#"CKAN { url: "", token: Some("") }"#);
|
||||
Ok(())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue