socieboy's avatar

@can condition on blade is not working on test unit

Does anyone know if there is something special on the @can condition when running the test case?

I have a test that assertSeeText('') inside of this directive, but when i look at the HTML the HTML inside is not being rendered, if i change the @can for a @if with the the same condition that the user have specific role it works.

I will appreciate the help.

0 likes
1 reply
socieboy's avatar
socieboy
OP
Best Answer
Level 14

I found that i was doing the test wrong, i have to manually load the abilities in the test.

Please or to participate in this conversation.