title: Rails - Model Testing with MiniTest and Devise gem
body: <p>I'm trying to test the User Model, which I've got Devise authentication.
  But I've got a failure:</p>
  
  <blockquote>
    <p>Failure:
    UserTest#test_should_be_valid [/home/nikki/Documents/TheHackingProject/week06/monday/the_private_club/test/models/user_test.rb:12]:
    Expected false to be truthy.</p>
  </blockquote>
  
  <p>This is my user_test.rb file:</p>
  
  <pre><code>require 'test_helper'
  
  class UserTest &lt; ActiveSupport::TestCase
    def setup
      @user = User.create(
        first_name: 'Marge',
        last_name: 'Simpson',
        email: 'marge@simpson.com'
        )
    end
  
    test 'should be valid' do
      assert @user.valid?
    end
  
    test 'first name cant be blank' do
      @user.first_name = ""
      assert_not @user.valid?
    end
  
    test 'last name cant be blank' do
      @user.last_name = ""
      assert_not @user.valid?
    end
  end
  </code></pre>
  
  <p>And this my schema.rb file:</p>
  
  <pre><code>ActiveRecord::Schema.define(version: 2018_11_05_115404) do
  
    # These are extensions that must be enabled in order to support this database
    enable_extension "plpgsql"
  
    create_table "users", force: :cascade do |t|
      t.string "email", default: "", null: false
      t.string "encrypted_password", default: "", null: false
      t.string "reset_password_token"
      t.datetime "reset_password_sent_at"
      t.datetime "remember_created_at"
      t.datetime "created_at", null: false
      t.datetime "updated_at", null: false
      t.string "first_name"
      t.string "last_name"
      t.index ["email"], name: "index_users_on_email", unique: true
      t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
    end
  
  end
  </code></pre>
  
  <p>Also, I don't understand how can I test the password which is encrypted?</p>