Render user app in test env
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
module Users
|
||||
class ApplicationController < ::ApplicationController
|
||||
before_action :allow_all_origins
|
||||
before_action :user_authentication, :unless => ->(c){ %w(obtain_token).include?(c.action_name) } # , except: [:obtain_token, :index]
|
||||
before_action :user_authentication, unless: ->(c){ %w(obtain_token).include?(c.action_name) } # , except: [:obtain_token, :index]
|
||||
|
||||
private
|
||||
|
||||
@@ -11,6 +11,7 @@ module Users
|
||||
sign_in user if user
|
||||
sign_out current_user if current_user && !user # Other token attempt of logged in user
|
||||
else
|
||||
return if Rails.env.test? and action_name == 'index'
|
||||
authenticate_user!
|
||||
end
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
0.9.47
|
||||
0.9.48
|
||||
|
||||
@@ -29,7 +29,7 @@ module SpecRouteHelpers
|
||||
# currentRouteName does not include model information: /list/123 => currentRouteName == 'list'
|
||||
# page.evaluate_script %|App.__container__.lookup('controller:application').get('currentRouteName')|
|
||||
# page.evaluate_script %|App.__container__.lookup('router:main').location.lastSetURL| # not working for direct path supplier#/settings
|
||||
route = page.evaluate_script %{App.__container__ && (window.location.hash || "#/").substr(1)}
|
||||
route = page.evaluate_script(%{App.__container__ && (window.location.hash || "#/").substr(1)})
|
||||
unless omit_should_raise
|
||||
def route.should(*)
|
||||
raise "Cannot call should on ember route. Use ember_route_should_be instead"
|
||||
|
||||
Reference in New Issue
Block a user