Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for exports (0.18 sec)

  1. schema/relationship_test.go

    		t.Fatalf("expects 1 relations, but got %v", len(userSchema.Relationships.Relations))
    	}
    
    	if createdByRel, ok := userSchema.Relationships.Relations["CreatedBy"]; ok {
    		if createdByRel.FieldSchema != userSchema {
    			t.Fatalf("expects same field schema, but got new %p, old %p", createdByRel.FieldSchema, userSchema)
    		}
    	} else {
    		t.Fatalf("expects created by relations, but not found")
    	}
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 25.5K bytes
    - Viewed (0)
  2. tests/create_test.go

    	user := *GetUser("create", Config{})
    
    	if results := DB.Create(&user); results.Error != nil {
    		t.Fatalf("errors happened when create: %v", results.Error)
    	} else if results.RowsAffected != 1 {
    		t.Fatalf("rows affected expects: %v, got %v", 1, results.RowsAffected)
    	}
    
    	if user.ID == 0 {
    		t.Errorf("user's primary key should has value after create, got : %v", user.ID)
    	}
    
    	if user.CreatedAt.IsZero() {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 26.4K bytes
    - Viewed (0)
  3. tests/callbacks_test.go

    		funcs = reflect.ValueOf(v).Elem().FieldByName("fns")
    	)
    
    	for i := 0; i < funcs.Len(); i++ {
    		got = append(got, getFuncName(funcs.Index(i)))
    	}
    
    	return fmt.Sprint(got) == fmt.Sprint(fnames), fmt.Sprintf("expects %v, got %v", fnames, got)
    }
    
    func getFuncName(fc interface{}) string {
    	reflectValue, ok := fc.(reflect.Value)
    	if !ok {
    		reflectValue = reflect.ValueOf(fc)
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Mar 26 03:33:36 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  4. tests/migrate_test.go

    					t.Fatalf("column name type should be correct, name: %v, length: %v, expects: %v, column: %#v",
    						columnType.Name(), columnType.DatabaseTypeName(), dataType, columnType)
    				}
    				if length, ok := columnType.Length(); !ok || length != 100 {
    					t.Fatalf("column name length should be correct, name: %v, length: %v, expects: %v, column: %#v",
    						columnType.Name(), length, 100, columnType)
    				}
    			case "age":
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Mar 18 11:24:16 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  5. logger/sql_test.go

    		},
    	}
    
    	for idx, r := range results {
    		if result := logger.ExplainSQL(r.SQL, r.NumericRegexp, `"`, r.Vars...); result != r.Result {
    			t.Errorf("Explain SQL #%v expects %v, but got %v", idx, r.Result, result)
    		}
    	}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Mar 21 08:00:02 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  6. tests/query_test.go

    		totalBatch += batch
    
    		if tx.RowsAffected != 2 {
    			t.Errorf("Incorrect affected rows, expects: 2, got %v", tx.RowsAffected)
    		}
    
    		if len(results) != 2 {
    			t.Errorf("Incorrect users length, expects: 2, got %v", len(results))
    		}
    
    		for idx := range results {
    			results[idx].Name = results[idx].Name + "_new"
    		}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
Back to top