no-commit-to-branch: Default to both master and main
diff --git a/tests/no_commit_to_branch_test.py b/tests/no_commit_to_branch_test.py
index 72b32e6..610e660 100644
--- a/tests/no_commit_to_branch_test.py
+++ b/tests/no_commit_to_branch_test.py
@@ -67,3 +67,10 @@
cmd_output('git', 'checkout', head)
# we're not on a branch!
assert main(()) == 0
+
+
+@pytest.mark.parametrize('branch_name', ('master', 'main'))
+def test_default_branch_names(temp_git_dir, branch_name):
+ with temp_git_dir.as_cwd():
+ cmd_output('git', 'checkout', '-b', branch_name)
+ assert main(()) == 1