Commit 8617fa83
Changed files (6)
app
models
config
spec
app/models/user.rb
@@ -18,7 +18,6 @@ class User < ActiveRecord::Base
validates :website, :format => URI::regexp(%w(http https)), :allow_blank => true
#validates :password, length: { in: 6..20 }, unless: Proc.new { |x| x.password.blank? }
- #devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable, :token_authenticatable
validates_presence_of :password, :if => :password_required?
validates_confirmation_of :password, :if => :password_required?
validates_length_of :password, :within => 6..20, :allow_blank => true
config/application.rb
@@ -33,13 +33,6 @@ module Cake
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
- #config.to_prepare {
- #Devise::SessionsController.layout "application"
- ## Devise::RegistrationsController.layout proc{ |controller| user_signed_in? ? "application" : "users" }
- #Devise::ConfirmationsController.layout "application"
- #Devise::UnlocksController.layout "application"
- #Devise::PasswordsController.layout "application"
- #}
config.middleware.use ExceptionNotification::Rack, :email => {
:email_prefix => "[Boom! #{Rails.env}] ",
:sender_address => %{"notifier" <notifier@cakeside.com>},
config/routes.rb
@@ -50,8 +50,6 @@ Cake::Application.routes.draw do
# /search
get "search" => 'search#index'
- # /users
- #devise_for :users, :controllers => {:registrations => 'registrations'}, :path => '', :path_names => { :sign_in => "signin", :sign_out => "signout", :sign_up => "register" }
resources :passwords, only: [:new, :create, :edit, :update]
resource :registration, only: [:create]
spec/controllers/profiles_controller_spec.rb
@@ -1,15 +1,10 @@
require 'rails_helper'
describe ProfilesController do
- #include Devise::TestHelpers
-
let(:user) { create(:user) }
let!(:creation) { create(:creation, user: user) }
- before (:each) do
- #request.env['warden'] = double(Warden, :authenticate => user, :authenticate! => user)
- http_login(user)
- end
+ before { http_login(user) }
describe "GET 'index'" do
before :each do
spec/support/devise_helper.rb → spec/support/authentication.rb
File renamed without changes
spec/rails_helper.rb
@@ -41,7 +41,6 @@ RSpec.configure do |config|
# https://relishapp.com/rspec/rspec-rails/docs
config.infer_spec_type_from_file_location!
config.include Authentication, type: :controller
- #config.include Devise::TestHelpers, type: :controller
config.include WaitForAjax, type: :feature
config.before(:suite) do