Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestSaveWithPrimaryValue (0.23 sec)

  1. tests/update_test.go

    	}
    
    	var result3 User
    	if err := DB.First(&result3, "name = ?", "save3__").Error; err != nil || result3.ID != user3.ID {
    		t.Fatalf("failed to find updated user")
    	}
    }
    
    func TestSaveWithPrimaryValue(t *testing.T) {
    	lang := Language{Code: "save", Name: "save"}
    	if result := DB.Save(&lang); result.RowsAffected != 1 {
    		t.Errorf("should create language, rows affected: %v", result.RowsAffected)
    	}
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Dec 04 03:50:58 UTC 2023
    - 30.3K bytes
    - Viewed (0)
Back to top