Skip to content

Commit

Permalink
Add test case for #8436
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Mar 16, 2016
1 parent 9899909 commit 33186dc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/TestCase/ORM/TableTest.php
Expand Up @@ -806,7 +806,12 @@ public function testAddAssociations()
'hasOne' => ['profiles'],
'hasMany' => ['authors'],
'belongsToMany' => [
'tags' => ['joinTable' => 'things_tags']
'tags' => [
'joinTable' => 'things_tags',
'conditions' => [
'Tags.starred' => true
]
]
]
];

Expand Down Expand Up @@ -834,6 +839,7 @@ public function testAddAssociations()
$this->assertInstanceOf('Cake\ORM\Association\BelongsToMany', $belongsToMany);
$this->assertEquals('tags', $belongsToMany->name());
$this->assertSame('things_tags', $belongsToMany->junction()->table());
$this->assertSame(['Tags.starred' => true], $belongsToMany->conditions());
}

/**
Expand Down

0 comments on commit 33186dc

Please sign in to comment.