I am getting this weird error while comparing Cron expressions but I am not sure what it is indicating.
System.AssertException: Assertion Failed: Expected: 0 0 12 1/1 12 ? 2022, Actual: 0 0 12 1/1 12 ? 2022
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
When testing your scheduled jobs, asserting on the CRON string is going to far. You should just verify that the job got scheduled and leave it at that.
MySchedulable job = new MySchedulable(); Test.startTest(); system.schedule('Job Name', cron, job); Test.stopTest(); system.assertEquals(1, [SELECT count() FROM CronTrigger], 'The job should be scheduled');