Unit tests for token and update models
This commit is contained in:
parent
c0904f1942
commit
de8b73dd92
41 changed files with 11919 additions and 0 deletions
59
vendor/gopkg.in/testfixtures.v2/deprecated.go
generated
vendored
Normal file
59
vendor/gopkg.in/testfixtures.v2/deprecated.go
generated
vendored
Normal file
|
@ -0,0 +1,59 @@
|
|||
package testfixtures
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
)
|
||||
|
||||
type (
|
||||
DataBaseHelper Helper // Deprecated: Use Helper instead
|
||||
|
||||
PostgreSQLHelper struct { // Deprecated: Use PostgreSQL{} instead
|
||||
PostgreSQL
|
||||
UseAlterConstraint bool
|
||||
}
|
||||
MySQLHelper struct { // Deprecated: Use MySQL{} instead
|
||||
MySQL
|
||||
}
|
||||
SQLiteHelper struct { // Deprecated: Use SQLite{} instead
|
||||
SQLite
|
||||
}
|
||||
SQLServerHelper struct { // Deprecated: Use SQLServer{} instead
|
||||
SQLServer
|
||||
}
|
||||
OracleHelper struct { // Deprecated: Use Oracle{} instead
|
||||
Oracle
|
||||
}
|
||||
)
|
||||
|
||||
func (h *PostgreSQLHelper) disableReferentialIntegrity(db *sql.DB, loadFn loadFunction) error {
|
||||
h.PostgreSQL.UseAlterConstraint = h.UseAlterConstraint
|
||||
return h.PostgreSQL.disableReferentialIntegrity(db, loadFn)
|
||||
}
|
||||
|
||||
// LoadFixtureFiles load all specified fixtures files into database:
|
||||
// LoadFixtureFiles(db, &PostgreSQL{},
|
||||
// "fixtures/customers.yml", "fixtures/orders.yml")
|
||||
// // add as many files you want
|
||||
//
|
||||
// Deprecated: Use NewFiles() and Load() instead.
|
||||
func LoadFixtureFiles(db *sql.DB, helper Helper, files ...string) error {
|
||||
c, err := NewFiles(db, helper, files...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return c.Load()
|
||||
}
|
||||
|
||||
// LoadFixtures loads all fixtures in a given folder into the database:
|
||||
// LoadFixtures("myfixturesfolder", db, &PostgreSQL{})
|
||||
//
|
||||
// Deprecated: Use NewFolder() and Load() instead.
|
||||
func LoadFixtures(folderName string, db *sql.DB, helper Helper) error {
|
||||
c, err := NewFolder(db, helper, folderName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return c.Load()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue