1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Use single quotes consistently through the integration test example.

This commit is contained in:
Lucas Mazza 2016-05-15 19:19:27 -03:00
parent 8e6e70eaa7
commit 48251f236f
No known key found for this signature in database
GPG key ID: C009F9A6BE4A44CB

View file

@ -20,10 +20,10 @@ require 'active_record'
require 'devise/rails/routes'
require 'devise/rails/warden_compat'
ActiveRecord::Base.establish_connection( adapter: :sqlite3, database: ":memory:")
ActiveRecord::Base.establish_connection( adapter: :sqlite3, database: ':memory:')
class DeviseCreateUsers < ActiveRecord::Migration
def change
def change
create_table(:users) do |t|
t.string :email, null: false
t.string :encrypted_password, null: true
@ -44,14 +44,14 @@ class TestApp < Rails::Application
secrets.secret_token = 'secret_token'
secrets.secret_key_base = 'secret_key_base'
config.eager_load = false
config.middleware.use Warden::Manager do |config|
Devise.warden_config = config
end
config.logger = Logger.new($stdout)
Rails.logger = config.logger
end
Rails.application.initialize!
@ -64,7 +64,7 @@ end
Rails.application.routes.draw do
devise_for :users
get '/' => 'test#index'
end
@ -73,9 +73,9 @@ end
class TestController < ApplicationController
include Rails.application.routes.url_helpers
before_filter :authenticate_user!
def index
render plain: 'Home'
end
@ -86,11 +86,11 @@ require 'minitest/autorun'
class BugTest < ActionDispatch::IntegrationTest
include Rack::Test::Methods
include Warden::Test::Helpers
def test_returns_success
Warden.test_mode!
login_as User.create!(email: "test@test.com", password: "test123456", password_confirmation: "test123456")
login_as User.create!(email: 'test@test.com', password: 'test123456', password_confirmation: 'test123456')
get '/'
assert last_response.ok?