mirror of
https://github.com/Threnklyn/jira.git
synced 2026-05-19 04:33:28 +02:00
add test to make sure IssueType.Fields does not disappear on regeneration
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user