Example #1
0
        public void SignatureIsValidActualJson()
        {
            var payload           = SampleData.BranchCreate.Body;
            var expectedSignature = SampleData.BranchCreate.Signature;
            var secret            = IntegrationTests.FunctionBuilder.AppConfig.GitHubWebhookSecret;

            Assert.IsTrue(GitHubSignatureValidator.IsSignatureValid(payload, expectedSignature, secret));
        }
Example #2
0
 public void SignatureIsNotValid(string payload, string expectedSignature)
 {
     Assert.IsFalse(GitHubSignatureValidator.IsSignatureValid(payload, expectedSignature, Secret));
 }