Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Yancey (0.15 sec)

  1. tests/transaction_test.go

    		}
    	})
    }
    
    func TestCancelTransaction(t *testing.T) {
    	ctx := context.Background()
    	ctx, cancelFunc := context.WithCancel(ctx)
    	cancelFunc()
    
    	user := *GetUser("cancel_transaction", Config{})
    	DB.Create(&user)
    
    	err := DB.WithContext(ctx).Transaction(func(tx *gorm.DB) error {
    		var result User
    		tx.First(&result, user.ID)
    		return nil
    	})
    
    	if err == nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Jun 10 13:05:19 GMT 2023
    - 10.9K bytes
    - Viewed (0)
Back to top