Testing A Rails App That Uses Devise Sessions | Ruby On Rails 7 Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ธ.ค. 2024

ความคิดเห็น • 9

  • @Deanin
    @Deanin  2 ปีที่แล้ว +6

    You have to appreciate the shift in my tone at around 7 minutes when I stop talking like tutorial Dean and start talking like software developer Dean haha. I wish I could do dedicated videos on topics like that, the TikToks were a lot of fun but I never had enough time to really get on my high horse lol. Hope this video helps!

  • @daveomcd
    @daveomcd 2 ปีที่แล้ว +3

    If you are using the Devise module, "Confirmable", be sure to add the timestamps for confirmed_at and confirmation_sent_at to your fixtures file.

    • @wuliwong
      @wuliwong ปีที่แล้ว +1

      Thank you!

  • @MoLcZaN
    @MoLcZaN 2 ปีที่แล้ว +1

    You are genius. Thanks for that Video !

  • @АлексейКмит-ф6ь
    @АлексейКмит-ф6ь 2 ปีที่แล้ว

    Thank you for your tutorials. They really helped me in understanding devise as a part of my app. Wish you only the best things and progression!

  • @martinarce8138
    @martinarce8138 2 ปีที่แล้ว +2

    My respect to you. I am the junior developer who's gonna break your app. Thank you.

    • @Deanin
      @Deanin  2 ปีที่แล้ว

      Haha, we all take turns being that developer some days. 🤠

  • @fernandomarques281
    @fernandomarques281 2 ปีที่แล้ว

    Awesome video! Didn't know about your channel!
    I am building a Twitter breakable toy, so I can learn more about rails 6/devise/minitests, but I have an error when testing the like functionality:
    As I need to pass the like ID to destroy it (many_to_many association), I use the current_user helper from devise. The problem with this approach is that I haven't found so far a way to implement the Helpers other than the sign_in/out for my testing, so it throws an error like this:
    ActionView::Template::Error: Devise could not find the `Warden::Proxy` instance on your request environment.
    How can I use the devise Helpers in my testing? Is it even possible without rspec?

  • @supairish
    @supairish 2 ปีที่แล้ว

    Controller specs are basically soft deprecated and don't test the full request/response cycle. You should really write this test as an integration test (TestUnit) or request spec (RSpec), otherwise you're unit testing a controller which isn't accurately representing how a authenticated session works (cookies, etc) Cheers!