Skip to content

Conversation

khoden
Copy link

@khoden khoden commented Aug 3, 2017

type WithDate struct {
	Time dat.NullTime `json:"time"`
}

func TestParseNumberAsDate(t *testing.T) {
	data := `{"time":5}`
	result := &WithDate{}
	json.Unmarshal([]byte(data), result) // PANIC!
}

```json
type WithDate struct {
	Time dat.NullTime `json:"time"`
}

func TestParseNumberAsDate(t *testing.T) {
	data := `{"time":5}`
	result := &WithDate{}
	json.Unmarshal([]byte(data), result) // PANIC!
}
```
Copy link

@C-Pro C-Pro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems legit

@JelteF
Copy link

JelteF commented Aug 15, 2017

This test should probably be added to the actual tests as well.

@khoden
Copy link
Author

khoden commented Aug 25, 2017

Please, accept

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants