Created
March 18, 2018 22:31
-
-
Save lfreeland/0875323bd9f7566750121511418c33bd to your computer and use it in GitHub Desktop.
Lightning Record Video Viewer Component Apex Controller Test Class
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 with sharing class RecordVideoViewerControllerTest { | |
| @isTest | |
| static void getVideoURL_accountWithWebsiteAsVideoSource_expectVideoSourceUrlReturnedTest() { | |
| String videoSrcURL = 'http://vid@example.com'; | |
| Account acct = new Account( | |
| Name = 'Test Account', | |
| Website = videoSrcURL | |
| ); | |
| insert acct; | |
| String recordVideoSrcUrl = RecordVideoViewerController.getVideoURL(acct.Id, 'Website'); | |
| system.assertEquals(videoSrcURL, recordVideoSrcUrl, 'The video url was not retrieved from the website field on the account.'); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment