]> gitweb.mndrdr.org Git - arelpe.git/commitdiff
Include devise in tests
authorAidan Cornelius-Bell <[email protected]>
Tue, 31 Dec 2024 21:43:37 +0000 (08:13 +1030)
committerAidan Cornelius-Bell <[email protected]>
Tue, 31 Dec 2024 21:43:37 +0000 (08:13 +1030)
test/fixtures/users.yml
test/test_helper.rb

index d2d415b04a038e457659bab57577142a5d3b26eb..e8250084336c976cf439967d9e082ebc80f95ee1 100644 (file)
@@ -9,7 +9,7 @@ admin:
   first_name: Admin
   last_name: User
   admin: true
-  encrypted_password: <%= BCrypt::Password.create('password123') %>
+  encrypted_password: <%= Devise::Encryptor.digest(User, 'password123') %>
   confirmed_at: <%= Time.current - 1.month %>
   support_type: ongoing
   subscription_status: active
@@ -20,7 +20,7 @@ regular_user:
   first_name: Regular
   last_name: User
   admin: false
-  encrypted_password: <%= BCrypt::Password.create('password123') %>
+  encrypted_password: <%= Devise::Encryptor.digest(User, 'password123') %>
   confirmed_at: <%= Time.current - 2.weeks %>
   support_type: non_financial
   subscription_status:
@@ -31,7 +31,7 @@ paid_user:
   first_name: Paid
   last_name: User
   admin: false
-  encrypted_password: <%= BCrypt::Password.create('password123') %>
+  encrypted_password: <%= Devise::Encryptor.digest(User, 'password123') %>
   confirmed_at: <%= Time.current - 1.week %>
   support_type: one_time
   subscription_status: one_time
index 0c22470ec14ec523287bf465a3a3b9c1939a9908..57e77150e0b48274c094c3185f8b0e7ea0931037 100644 (file)
@@ -1,6 +1,7 @@
 ENV["RAILS_ENV"] ||= "test"
 require_relative "../config/environment"
 require "rails/test_help"
+require 'devise' # Add this line
 
 module ActiveSupport
   class TestCase