fix: update docs and errors with CKANError

This commit is contained in:
rzmk 2026-05-05 16:48:56 -04:00
parent 677475f750
commit e5d4f8d442
5 changed files with 18 additions and 11 deletions

View file

@ -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(())