davidhabib / Auctions-for-Salesforce

DJH Consulting's Auctions for Salesforce managed package
http://djhconsulting.com/auctions-for-salesforce/
7 stars 14 forks source link

test code should set auction date far into future #40

Closed davidhabib closed 11 years ago

davidhabib commented 12 years ago

in AUC_CTRL_SoqlListView.cls, the test code creates an auction with the date of system.today(), and then asserts that it will be the first auction in the list of auctions. This is an incorrect assumption; the user could have created an auction for next month! The test code should probably set it for some date far into the future.

Need to review all test code to see if other test routines have this same invalid assumption.

dbitting commented 12 years ago

Once you shift the API version of the files to v24.0 or greater, they will only see test data during test execution, unless you include the @IsTest(SeeAllData=true) annotation. That should help.

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_testing_data_access.htm

davidhabib commented 11 years ago

I've verified that all classes and triggers have been updated to version 25 of the api, so this is no longer an issue.