namespace FundLab.Api.Tests module ApiTests = open Xunit open FundLab.Api [] [] [] [] let ``missing or wrong bearer token is unauthorized`` header = Assert.Equal(AuthDecision.Unauthorized, Authentication.authorize "secret" header) [] let ``matching bearer token is authorized`` () = Assert.Equal(AuthDecision.Authorized, Authentication.authorize "secret" "Bearer secret") [] let ``health payload is non-sensitive`` () = let payload = Health.payload "fund-lab-api" Assert.Contains("\"status\":\"ok\"", payload) Assert.DoesNotContain("secret", payload)