Move scene shape facts into the scene family
This commit is contained in:
@@ -168,6 +168,22 @@ func TestCodecCandidatePreservesValidatorOwnedValues(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCodecAllowsNonblankUntrimmedFields(t *testing.T) {
|
||||
value := validList()
|
||||
value.Scenes[0].ID = " id "
|
||||
value.Scenes[0].Title = " title "
|
||||
value.Scenes[0].Summary = " summary "
|
||||
value.Scenes[0].SourceRef.SourceID = " source "
|
||||
encoded, err := New().Encode(value)
|
||||
if err != nil {
|
||||
t.Fatalf("Encode() error = %v, want untrimmed nonblank values accepted", err)
|
||||
}
|
||||
decoded, err := New().Decode(encoded)
|
||||
if err != nil || !reflect.DeepEqual(decoded, value) {
|
||||
t.Fatalf("Decode() = %#v, %v", decoded, err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCodecRejectsInvalidDurableRangesWhileCandidatesPreserveThem(t *testing.T) {
|
||||
codec := New()
|
||||
for _, test := range []struct {
|
||||
|
||||
Reference in New Issue
Block a user