fix(test): searching with trailing space returns data on MSSQL
Microsoft SQL Server automatically pads the shorter of two strings of unequal length with spaces prior to comparisons. Thus, searching for username = 'test ' (unexpectedly) matches a row where username = 'test'. Since kanboard does not rely on this behavior or its absence, simply remove the test as unecessary to avoid this differing result amongst the various database backends. Ref: https://support.microsoft.com/en-us/topic/inf-how-sql-server-compares-strings-with-trailing-spaces-b62b1a2d-27d3-4260-216d-a605719003b0
This commit is contained in:
parent
a69709b305
commit
87e9a770c8
|
|
@ -401,6 +401,5 @@ class UserModelTest extends Base
|
|||
$this->assertNotFalse($userModel->create(array('username' => 'test ')));
|
||||
|
||||
$this->assertNotEmpty($userModel->getByUsername('test'));
|
||||
$this->assertEmpty($userModel->getByUsername('test '));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue