Created
September 15, 2019 15:34
-
-
Save jaspreetsidhu/88fee6362d833ea04fff72c0313e2b5c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@isTest | |
public class TestRestrictContactByName { | |
@isTest static void testContactTrigger() { | |
Test.StartTest(); | |
Contact c = new Contact(LastName = 'INVALIDNAME'); | |
Database.SaveResult result = Database.insert(c, false); | |
System.assert(!result.isSuccess()); | |
System.assert(result.getErrors().size() > 0); | |
Test.StopTest(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment