VE-1415: Adding test for editing template

Adding a test to edit a template and verify the wikitext that it generates.
Refactored the method to handle inline diff.