Add failing scenario for testing user token change

This commit is contained in:
2013-11-07 09:57:07 +01:00
parent c04d602e7f
commit 7b9b784ef9
5 changed files with 33 additions and 4 deletions
+1
View File
@@ -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}
+8
View File
@@ -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
+1 -2
View File
@@ -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(){},