Skip to content

Commit

Permalink
Fix order of hasOne assocation.
Browse files Browse the repository at this point in the history
This should fix non-deterministic failures.
  • Loading branch information
markstory committed Feb 11, 2015
1 parent 400052e commit 3dfa22b
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -254,7 +254,11 @@ public function testAuthenticateUserFieldsSuccess() {
*/
public function testAuthenticateUserFieldsRelatedModelsSuccess() {
$User = ClassRegistry::init('User');
$User->bindModel(array('hasOne' => array('Article')));
$User->bindModel(array('hasOne' => array(
'Article' => array(
'order' => 'Article.id ASC'
)
)));
$this->auth->settings['recursive'] = 0;
$this->auth->settings['userFields'] = array('Article.id', 'Article.title');
$request = new CakeRequest('posts/index', false);
Expand Down

0 comments on commit 3dfa22b

Please sign in to comment.