Thanks for you reply! I guess my thought process was to check authentication on my site in the following way. And I saw this as something that I should be testing and not the developers of the google_sign_in gem.
*Test:* 1. Test that when an admin user clicks on the "Sign in with Google" link, that person is then redirected to an "admin page". 2. Test that when a site visitor clicks on the "Sign in with Google" link, that person is then redirected to the root_path. If I'm correct in testing these two options... How do I test the "Sign in with Google" link where I send Google information and then receive their authentication object back? Perhaps Google supplies a "fake" login for developers to use? I couldn't find it if so. On Tuesday, December 11, 2018 at 1:12:56 PM UTC-5, hasan...@gmail.com wrote: > > David, > You test only functionality provided by YOU. You don't necessarily need to > test upstream functionality. For example, in an app I recently wrote, I > needed to provide the time of intersection between two curves and used a > library to provide the (maybe complex) maths for the intersection. Rightly > or wrongly, I would rely on the upstream developers to make sure the maths > are accurate and just test that if curve A and curve B intersect, a time is > provided. Also, if there isn't an intersection, a sentinel is returned. -- > H > > On Mon, 10 Dec 2018 at 03:19, David McDonald <dave...@gmail.com > <javascript:>> wrote: > >> I'm currently writing a small app trying to understand "tests" better. >> More specifically testing the authentication of my little app. Right now >> I've set it up with the bootcamp/google_sign_in >> <https://github.com/basecamp/google_sign_in> gem. Everything works >> correctly in my application, but when I go to write the test for it I'm >> unsure how since I'm expecting a 3rd party to provide information. Is this >> where I would mock the return object from google and proceed the lookup >> from my fixtures user file? I'm unsure this is the approach that should be >> taken. If anyone could give me more insight into how to properly do this >> it would be greatly appreciated. Thanks! >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to rubyonrails-ta...@googlegroups.com <javascript:>. >> To post to this group, send email to rubyonra...@googlegroups.com >> <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/rubyonrails-talk/0fa542c8-2187-4f4c-a344-3d746c98a66d%40googlegroups.com >> >> <https://groups.google.com/d/msgid/rubyonrails-talk/0fa542c8-2187-4f4c-a344-3d746c98a66d%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > -- > OpenPGP: > https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1 > If you wish to request my time, please do so using > *bit.ly/hd1AppointmentRequest > <http://bit.ly/hd1AppointmentRequest>*. > Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest > <http://bit.ly/hd1AppointmentRequest>*. > > <https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1>Sent > from my mobile device > Envoye de mon portable > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f2f8b434-345d-489b-a16d-74712e477b82%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.