github.com/Ali-iotechsys/sqlboiler/v4@v4.0.0-20221208124957-6aec9a5f1f71/boil/db_test.go (about)

     1  package boil
     2  
     3  import (
     4  	"database/sql"
     5  	"testing"
     6  )
     7  
     8  func TestGetSetDB(t *testing.T) {
     9  	t.Parallel()
    10  
    11  	SetDB(&sql.DB{})
    12  
    13  	if GetDB() == nil {
    14  		t.Errorf("Expected GetDB to return a database handle, got nil")
    15  	}
    16  }