()
| 647 | |
| 648 | #[test] |
| 649 | fn test_convert_view_not_found() { |
| 650 | // The server returns 404 both for a genuinely-missing view and for a |
| 651 | // private one the caller can't see. On a push (a write that needs |
| 652 | // auth) the message must name the view *and* explain that this may be |
| 653 | // an auth/authorization problem, with the remedy to run identity |
| 654 | // register — not the misleading "view not found". |
| 655 | let err = RemoteError::view_not_found("main"); |
| 656 | let cli_err = convert_remote_error(err, "http://example.com"); |
| 657 | |
| 658 | match cli_err { |
| 659 | CliError::RemoteError { message, .. } => { |
| 660 | let lower = message.to_lowercase(); |
| 661 | assert!(message.contains("main")); |
| 662 | assert!(message.contains("not found")); |
| 663 | assert!(lower.contains("authenticated") || lower.contains("authorized")); |
| 664 | assert!(message.contains("atomic identity register")); |
| 665 | } |
| 666 | _ => panic!("Expected RemoteError"), |
| 667 | } |
| 668 | } |
| 669 | |
| 670 | #[test] |
| 671 | fn test_convert_missing_deps() { |
nothing calls this directly
no test coverage detected