File tree Expand file tree Collapse file tree
tests/specs/integration/BaseEntity Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -426,6 +426,9 @@ component extends="tests.resources.ModuleIntegrationSpec" {
426426 expect ( comment .hasAttribute ( " upperBody" ) ).toBeTrue (
427427 " Child class should have a virtual attribute 'upperBody'."
428428 );
429+
430+ expect ( comment .getBody () ).toBeWithCase ( " This is an internal comment. It is very, very private." );
431+ expect ( comment .getUpperBody () ).toBeWithCase ( " THIS IS AN INTERNAL COMMENT. IT IS VERY, VERY PRIVATE." );
429432 } );
430433 } );
431434
Original file line number Diff line number Diff line change @@ -184,6 +184,26 @@ component extends="tests.resources.ModuleIntegrationSpec" {
184184 expect ( posts ).toHaveLength ( 1 );
185185 expect ( posts [ 1 ].getAuthor ().getId () ).toBe ( 4 );
186186 } );
187+ it ( " can use whereHas when both nested relationships are belongsToMany" , function () {
188+ var posts = getInstance ( " Post" )
189+ .whereHas ( " tags.posts" , function ( q ) {
190+ q .where ( " post_pk" , 1245 );
191+ } )
192+ .get ();
193+
194+ expect ( posts ).toBeArray ();
195+ expect ( posts ).notToBeEmpty ();
196+ } );
197+ it ( " can join after populating a cloned query builder" , function () {
198+ var posts = getInstance ( " Post" ).newQuery ();
199+ posts .populateQuery ( posts .getQB ().clone () );
200+
201+ expect ( function () {
202+ posts .join ( " users" , function ( j ) {
203+ j .on ( " users.id" , posts .qualifyColumn ( " user_id" ) );
204+ } );
205+ } ).notToThrow ();
206+ } );
187207 } );
188208
189209 describe ( " hasManyThrough" , function () {
You can’t perform that action at this time.
0 commit comments