Skip to content

Commit 8002154

Browse files
committed
Fix test case for #587
Signed-off-by: lijunwei <ljw532344863@sina.com>
1 parent 6f2b3fd commit 8002154

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/units/test_init.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ def test_git_init
3838
assert(File.directory?(File.join(path, '.git')))
3939
assert(File.exist?(File.join(path, '.git', 'config')))
4040
assert_equal('false', repo.config('core.bare'))
41-
assert_equal("ref: refs/heads/master\n", File.read("#{path}/.git/HEAD"))
41+
42+
init_default_branch = `git config --get init.defaultBranch`.strip
43+
assert_equal("ref: refs/heads/#{init_default_branch}\n", File.read("#{path}/.git/HEAD"))
4244
end
4345
end
4446

0 commit comments

Comments
 (0)