Skip to content

Instantly share code, notes, and snippets.

@truth3
Created June 4, 2018 00:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save truth3/74ecd4173b1b4c6cf53d0610c6b3b2d4 to your computer and use it in GitHub Desktop.
Save truth3/74ecd4173b1b4c6cf53d0610c6b3b2d4 to your computer and use it in GitHub Desktop.
Test case that goes with the slack publisher code
@isTest
private class SlackOpportunityPublisherTest {
static testMethod void testPostToSlack() {
SlackOpportunityPublisher.Oppty opt = new SlackOpportunityPublisher.Oppty();
opt.opptyOwnerName = 'Test';
opt.acctName = 'Test';
opt.acctIndustry = 'Test';
opt.opptyItems = 'https://www.zerionsoftware.com';
opt.monthlySumAmount = 12345;
opt.quaterlySumAmount = 123456;
opt.annualSumAmount = 123456789;
opt.amount = 123456789;
List<slackopportunitypublisher.oppty> lis = new List<slackopportunitypublisher.oppty>();
lis.add(opt);
SlackOpportunityPublisher.postToSlack(lis);
System.assertEquals(lis, lis); // Can't really test this, just put something that is true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment