Add failing scenario for testing user token change
This commit is contained in:
@@ -11,6 +11,7 @@ class UserController < ApplicationController
|
||||
else
|
||||
authenticate_user!
|
||||
end
|
||||
|
||||
unless current_user.present?
|
||||
respond_to do |format|
|
||||
format.html {redirect_to new_user_session_path}
|
||||
|
||||
@@ -22,6 +22,14 @@ module ApplicationHelper
|
||||
super(*args)
|
||||
end
|
||||
|
||||
def user_dynamic_data_host
|
||||
case Rails.env
|
||||
when 'test' then "data_host = 'http://#{request.host}:#{request.port}';".html_safe
|
||||
when 'development' then "data_host = 'http://localhost:3000';".html_safe
|
||||
else ''
|
||||
end
|
||||
end
|
||||
|
||||
def are_you_sure?(record = nil)
|
||||
t('helpers.links.are_you_sure')
|
||||
end
|
||||
|
||||
@@ -32,8 +32,7 @@ html lang="en"
|
||||
var $locale = 'en';
|
||||
var $asset_path = '/assets/';
|
||||
var Qstorage = localStorage;
|
||||
#{Rails.env.production? ? '' : "data_host = 'http://localhost:3000';".html_safe }
|
||||
var data_host = 'http://localhost:3000';
|
||||
#{user_dynamic_data_host}
|
||||
QMobile || (QMobile = {
|
||||
scanQr: function(){window.location = '/select_qrcode'},
|
||||
activateRotation: function(){},
|
||||
|
||||
Reference in New Issue
Block a user