@@ -1416,8 +1416,10 @@ describe("AssetAccess", () => {
14161416 } ,
14171417 ] ) ;
14181418 return Effect . gen ( function * ( ) {
1419+ const decodeAssetCreateUrlInput = Schema . decodeEffect ( AssetCreateUrlInput ) ;
1420+
14191421 // Every client and server release spells the resource this way on the wire.
1420- const { resource } = yield * Schema . decodeEffect ( AssetCreateUrlInput ) ( {
1422+ const { resource } = yield * decodeAssetCreateUrlInput ( {
14211423 resource : { _tag : "github-media" , cwd : "/repo" , url } ,
14221424 } ) ;
14231425 const issued = yield * issueAssetUrl ( { resource } ) ;
@@ -1446,6 +1448,8 @@ describe("AssetAccess", () => {
14461448
14471449 it . effect ( "refuses media no host keeps behind a credential, without echoing the URL" , ( ) =>
14481450 Effect . gen ( function * ( ) {
1451+ const encodeAssetAccessError = Schema . encodeEffect ( Schema . fromJsonString ( AssetAccessError ) ) ;
1452+
14491453 for ( const url of [
14501454 "https://example.com/shot.png" ,
14511455 "https://example.com/shot.png?token=private-media-token" ,
@@ -1454,7 +1458,7 @@ describe("AssetAccess", () => {
14541458 resource : { _tag : SOURCE_CONTROL_MEDIA_ASSET , cwd : "/repo" , url } ,
14551459 } ) . pipe ( Effect . flip ) ;
14561460 expect ( error . _tag ) . toBe ( "AssetGitHubMediaUrlValidationError" ) ;
1457- const encoded = yield * Schema . encodeEffect ( Schema . fromJsonString ( AssetAccessError ) ) ( error ) ;
1461+ const encoded = yield * encodeAssetAccessError ( error ) ;
14581462 expect ( encoded ) . not . toContain ( url ) ;
14591463 }
14601464 } ) . pipe ( Effect . provide ( layerTest ) ) ,
0 commit comments