Skip to content

Commit

Permalink
add test to make sure IssueType.Fields does not disappear on regenera…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
coryb committed Oct 28, 2017
1 parent 794f8dd commit 3966def
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion jiradata/IssueType.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ package jiradata
type IssueType struct {
AvatarID int `json:"avatarId,omitempty" yaml:"avatarId,omitempty"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
Fields FieldMetaMap `json:"fields,omitempty" yaml:"fields,omitempty"`
IconURL string `json:"iconUrl,omitempty" yaml:"iconUrl,omitempty"`
ID string `json:"id,omitempty" yaml:"id,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Self string `json:"self,omitempty" yaml:"self,omitempty"`
Subtask bool `json:"subtask,omitempty" yaml:"subtask,omitempty"`
Fields FieldMetaMap `json:"fields,omitempty" yaml:"fields,omitempty"`
}
14 changes: 14 additions & 0 deletions jiradata/IssueType_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package jiradata

import (
"testing"

"github.com/stretchr/testify/assert"
)

func TestIssueTypeFields(t *testing.T) {
// this is because schema is wrong, missing the 'Fields' arguments, so we manually add it.
// If the jiradata is regenerated we need to manually make the change again to include:
// Fields FieldMetaMap `json:"fields,omitempty" yaml:"fields,omitempty"`
assert.IsType(t, FieldMetaMap{}, IssueType{}.Fields)
}

0 comments on commit 3966def

Please sign in to comment.