+ Start a Discussion
sfdc18sfdc18 

Test class for Trigger which calls @future method

Hi,

How to write a test class for trigger which calls @future method

for eg.
trigger AccountCallout on Account (after insert) {
for (Account a : Trigger.new) {
WebServiceCallout.sendNotification(a.Id);
}
}
 
Iqrar AhmedIqrar Ahmed
Hi sfdc 18,

Try this

https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_invoking_future_methods.htm
sfdc18sfdc18
Hi Cloud Rocky, Shaijan,

I tried link provided by Cloud Rocky.
I get below error 
Methods defined as TestMethod do not support Web service callouts, test skipped