File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -222,4 +222,24 @@ public function a_logged_out_user_cannot_toggle_a_like_on_a_reply()
222222 ->call ('toggleLike ' )
223223 ->assertSee ("0 \n" );
224224 }
225+
226+ /** @test */
227+ public function user_can_see_standalone_links_in_reply ()
228+ {
229+ $ user = $ this ->createUser ();
230+ $ thread = factory (Thread::class)->create (['slug ' => 'the-first-thread ' ]);
231+ factory (Reply::class)->create (['body ' =>'https://github.com/laravelio/laravel.io check this cool project ' ,'author_id ' => $ user ->id (), 'replyable_id ' => $ thread ->id ()]);
232+ $ this ->visit ("/forum/ {$ thread ->slug }" )
233+ ->see ('<p><a href=\"https:\/\/github.com\/laravelio\/laravel.io\" rel=\"nofollow\" target=\"_blank\">https:\/\/github.com\/laravelio\/laravel.io<\/a> check this cool project<\/p>\n ' );
234+ }
235+
236+ /** @test */
237+ public function user_can_see_standalone_links_in_thread ()
238+ {
239+ $ user = $ this ->createUser ();
240+ $ thread = factory (Thread::class)->create (['slug ' => 'the-first-thread ' ,'body ' => 'https://github.com/laravelio/laravel.io check this cool project ' ]);
241+ factory (Reply::class)->create (['author_id ' => $ user ->id (), 'replyable_id ' => $ thread ->id ()]);
242+ $ this ->visit ("/forum/ {$ thread ->slug }" )
243+ ->see ('<p><a href=\"https:\/\/github.com\/laravelio\/laravel.io\" rel=\"nofollow\" target=\"_blank\">https:\/\/github.com\/laravelio\/laravel.io<\/a> check this cool project<\/p>\n ' );
244+ }
225245}
You can’t perform that action at this time.
0 commit comments