1
// Copyright 2014 The Go Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style
3
// license that can be found in the LICENSE file.
9
func TestParseDraft(t *testing.T) {
15
{"unconfirmed", Unconfirmed, false},
16
{"provisional", Provisional, false},
17
{"contributed", Contributed, false},
18
{"approved", Approved, false},
19
{"", Approved, false},
20
{"foo", Approved, true},
22
for _, tt := range tests {
23
if d, err := ParseDraft(tt.in); d != tt.draft || (err != nil) != tt.err {
24
t.Errorf("%q: was %v, %v; want %v, %v", tt.in, d, err != nil, tt.draft, tt.err)