update: fix test for non-master update support

Commit a71d4a9b (PR Homebrew/homebrew#44058) brought support for updating repositories
with a default branch different from master. This fixes the tests broken
by that commit.

Closes Homebrew/homebrew#44135.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This commit is contained in:
Martin Afanasjew 2015-09-19 14:19:38 +02:00 committed by Dominyk Tiller
parent 520b8496d4
commit 37ce555104

View File

@ -58,6 +58,7 @@ class UpdaterTests < Homebrew::TestCase
FormulaVersions.stubs(:new).returns(stub(:formula_at_revision => "2.0"))
@updater.diff = fixture(fixture_name)
@updater.in_repo_expect("git diff --quiet", true)
@updater.in_repo_expect("git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null", "refs/remotes/origin/master")
@updater.in_repo_expect("git symbolic-ref --short HEAD 2>/dev/null", "master")
@updater.in_repo_expect("git rev-parse -q --verify HEAD", "1234abcd")
@updater.in_repo_expect("git config core.autocrlf false")