mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-11-27 05:39:55 +08:00
Fix test
This commit is contained in:
parent
55346ac4c0
commit
06b4ec0dbe
@ -16,6 +16,7 @@ class UserTest extends TestCase
|
||||
|
||||
public function testConvertQuery()
|
||||
{
|
||||
if (config('database.default') == 'mysql') {
|
||||
$this->assertStringContainsString(
|
||||
'where `bs_email`',
|
||||
ExtendedUser::where('email', '')->toSql()
|
||||
@ -36,6 +37,28 @@ class UserTest extends TestCase
|
||||
'having `bs_permission`',
|
||||
ExtendedUser::having('permission')->toSql()
|
||||
);
|
||||
} else {
|
||||
$this->assertStringContainsString(
|
||||
'where "bs_email"',
|
||||
ExtendedUser::where('email', '')->toSql()
|
||||
);
|
||||
$this->assertStringContainsString(
|
||||
'select "bs_email" from',
|
||||
ExtendedUser::select(['email'])->toSql()
|
||||
);
|
||||
$this->assertStringContainsString(
|
||||
'order by "bs_score"',
|
||||
ExtendedUser::orderBy('score')->toSql()
|
||||
);
|
||||
$this->assertStringContainsString(
|
||||
'group by "bs_permission"',
|
||||
ExtendedUser::groupBy('permission')->toSql()
|
||||
);
|
||||
$this->assertStringContainsString(
|
||||
'having "bs_permission"',
|
||||
ExtendedUser::having('permission')->toSql()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function testGetUidAttribute()
|
||||
|
Loading…
Reference in New Issue
Block a user