Fix couple misleading test failure messages
This commit is contained in:
parent
78948f1b7f
commit
6da7e8c64e
@ -1083,7 +1083,7 @@ func TestUpdate(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if db.First(&Product{}, "code = '789'").Error != nil {
|
if db.First(&Product{}, "code = '789'").Error != nil {
|
||||||
t.Errorf("Product 456 should be changed to 789")
|
t.Errorf("Product 123 should be changed to 789")
|
||||||
}
|
}
|
||||||
|
|
||||||
if db.Model(product2).Update("CreatedAt", time.Now().Add(time.Hour)).Error != nil {
|
if db.Model(product2).Update("CreatedAt", time.Now().Add(time.Hour)).Error != nil {
|
||||||
@ -1111,7 +1111,7 @@ func TestUpdate(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if db.First(&Animal{}, "name = 'Franz'").Error != nil {
|
if db.First(&Animal{}, "name = 'Franz'").Error != nil {
|
||||||
t.Errorf("Product 'nerdz' should be changed to 'Franz'")
|
t.Errorf("Animal 'nerdz' should be changed to 'Franz'")
|
||||||
}
|
}
|
||||||
|
|
||||||
if db.Model(animal2).Update("CreatedAt", time.Now().Add(time.Hour)).Error != nil {
|
if db.Model(animal2).Update("CreatedAt", time.Now().Add(time.Hour)).Error != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user