- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1
 
Add tests for Boolean DataType #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| DB.Create(&BooleanTest{Flag: false}) | ||
| 
               | 
          ||
| var trues []BooleanTest | ||
| if err := DB.Where("FLAG = ?", true).Find(&trues).Error; err != nil { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after Find(&trues), add an assert for the expected number of rows (or at least that >= 1 rows were returned).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something like:
if len(trues) == 0 { t.Fatalf("expected at least 1 row, got 0") }
No description provided.