blob: 8b80f9f4f4f9c9cbff9ba8c033497af9f095ecd4 [file] [log] [blame]
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import "testing"
func TestMail(t *testing.T) {
gt := newGitTest(t)
defer gt.done()
// fake auth information to avoid Gerrit error = "gerrit.fake"
auth.user = "not-a-user"
defer func() { = ""
auth.user = ""
testMain(t, "mail")
"git push -q origin HEAD:refs/for/master",
"git tag -f work.mailed")
func TestMailGitHub(t *testing.T) {
gt := newGitTest(t)
defer gt.done()
trun(t, gt.client, "git", "config", "remote.origin.url", "")
testMainDied(t, "mail")
testPrintedStderr(t, "git origin must be a Gerrit host, not GitHub:")