MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_patch_file_without_login

Function test_patch_file_without_login

client/src/cloud.rs:734–752  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

732 #[test]
733 #[ignore = "Requires environment configuration and is expensive"]
734 fn test_patch_file_without_login() {
735 #[tokio::main]
736 async fn run(context: &mut TestContext) {
737 let username = context.get_username(1);
738
739 context.do_login(1).await;
740 let (filename, _content) = context.random_file();
741
742 context.do_logout().await;
743 let err = context
744 .service
745 .patch_file_content(&username, &filename, b"foo".to_vec())
746 .await
747 .unwrap_err();
748 assert_eq!(io::ErrorKind::PermissionDenied, err.kind(), "{}", err);
749 assert!(format!("{}", err).contains("Not logged in"));
750 }
751 run(&mut TestContext::new_from_env());
752 }
753
754 #[test]
755 #[ignore = "Requires environment configuration and is expensive"]

Callers

nothing calls this directly

Calls 1

runFunction · 0.70

Tested by

no test coverage detected