Tests for update.ps1. Redundant code removed