test for empty aliases key
This commit is contained in:
parent
37761c97fa
commit
3b4b244ab0
1 changed files with 10 additions and 3 deletions
|
|
@ -35,15 +35,22 @@ hosts:
|
|||
|
||||
buf := bytes.NewBufferString("")
|
||||
defer config.StubWriteConfig(buf)()
|
||||
output, err := RunCommand("alias set co pr checkout -Rcool/repo")
|
||||
output, err := RunCommand("alias set co pr checkout")
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %s", err)
|
||||
}
|
||||
|
||||
test.ExpectLines(t, output.String(), "TODO")
|
||||
test.ExpectLines(t, output.String(), "Added alias")
|
||||
|
||||
// TODO
|
||||
expected := `aliases:
|
||||
co: pr checkout
|
||||
hosts:
|
||||
github.com:
|
||||
user: OWNER
|
||||
oauth_token: token123
|
||||
`
|
||||
eq(t, buf.String(), expected)
|
||||
}
|
||||
|
||||
func TestAliasSet_existing_alias(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue