#!/usr/bin/env python3
#
# Ensure --no-cover-letter won't generate a cover letter
#
# Copyright 2019 Red Hat, Inc.
#
# Authors:
#   Eduardo Habkost <ehabkost@redhat.com>
#
# This work is licensed under the MIT License.  Please see the LICENSE file or
# http://opensource.org/licenses/MIT.

from test_utils import *

git_publish('-b HEAD^ --no-cover-letter --no-inspect-emails ' \
            '--to somebody@example.com')

last = last_git_command()
assert last[:5] == ['send-email', '--to', 'somebody@example.com',
                    '--quiet', '--confirm=never'], \
       "Unexpected command run by git-publish"
assert len(last[5:]) == 1, \
    "Only one file should be passed to git-send-email"
