knock 1.5 → 2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Rakefile +2 -0
- data/app/controllers/knock/auth_token_controller.rb +4 -10
- data/app/model/knock/auth_token.rb +1 -6
- data/lib/generators/templates/knock.rb +0 -49
- data/lib/knock.rb +0 -10
- data/lib/knock/authenticable.rb +24 -19
- data/lib/knock/version.rb +1 -1
- data/test/dummy/app/controllers/custom_unauthorized_entity_controller.rb +13 -0
- data/test/dummy/app/controllers/protected_resources_controller.rb +1 -1
- data/test/dummy/config/application.rb +4 -2
- data/test/dummy/config/environments/test.rb +7 -2
- data/test/dummy/config/initializers/knock.rb +0 -2
- data/test/dummy/config/routes.rb +1 -0
- data/test/dummy/db/schema.rb +0 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +372 -351
- data/test/dummy/test/controllers/admin_token_controller_test.rb +3 -3
- data/test/dummy/test/controllers/current_users_controller_test.rb +8 -0
- data/test/dummy/test/controllers/custom_unauthorized_entity_controller_test.rb +42 -0
- data/test/dummy/test/controllers/protected_resources_controller_test.rb +2 -2
- data/test/dummy/test/controllers/vendor_protected_controller_test.rb +1 -1
- data/test/dummy/test/controllers/vendor_token_controller_test.rb +3 -3
- data/test/model/knock/auth_token_test.rb +0 -1
- data/test/tmp/config/initializers/knock.rb +59 -0
- metadata +8 -14
- data/test/controllers/knock/auth_token_controller_test.rb +0 -39
- data/test/tmp/app/controllers/admin_token_controller.rb +0 -2
- data/test/tmp/app/controllers/admin_user_token_controller.rb +0 -2
- data/test/tmp/app/controllers/user_admin_token_controller.rb +0 -2
- data/test/tmp/app/controllers/user_token_controller.rb +0 -2
- data/test/tmp/config/routes.rb +0 -17
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YmRmOTA3ZDVjNTA1ZjFiOWYwMmRlYjYwNzkyY2UzNTIzMWFhZGEyNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZGE1ZDRlNjhmMzY5Y2ZjMDc4Y2RkMjJkMGQxMWRkZDQ4NTczYzQ2MQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZWMxMmY2Y2IxNzZlNzQzYWZmNTUzNzI0ZjZiODBiNGEzMWVlZTNjNTI4Mzdh
|
10
|
+
NjU5MzgwMDcwMDNiOTI3NWNjZTczZjJlMjYwNjg4NDQxMzJlZDNmY2Y3NTI4
|
11
|
+
MDRjOGJjZDI5OWRhYzg2Mjg1NzY3MzZhZWQ0NzljMTY4NjI0Mjc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZWQ2Mjc4OWRiNGIxYjk2MTdiNWQyNWE2OTk5ZjZkMTIyMmI3OWIzMTIyYmIx
|
14
|
+
NGM0M2UyMDY0OGZiNDc4N2U1NTVhYmQ1MjIyY2I0MWFiYmFhYTEzMWQ0Yzc5
|
15
|
+
MDgxNTNiN2FiMDg4YmUxNzYwOTI0M2MwM2Y5YzEzNDY5OWYwNjY=
|
data/Rakefile
CHANGED
@@ -25,16 +25,10 @@ module Knock
|
|
25
25
|
|
26
26
|
def entity
|
27
27
|
@entity ||=
|
28
|
-
if
|
29
|
-
|
30
|
-
warn "[DEPRECATION]: Relying on `Knock.current_user_from_handle` is deprecated. Please implement `User#from_token_request` instead."
|
31
|
-
Knock.current_user_from_handle.call auth_params[Knock.handle_attr]
|
28
|
+
if entity_class.respond_to? :from_token_request
|
29
|
+
entity_class.from_token_request request
|
32
30
|
else
|
33
|
-
|
34
|
-
entity_class.from_token_request request
|
35
|
-
else
|
36
|
-
entity_class.find_by email: auth_params[:email]
|
37
|
-
end
|
31
|
+
entity_class.find_by email: auth_params[:email]
|
38
32
|
end
|
39
33
|
end
|
40
34
|
|
@@ -47,7 +41,7 @@ module Knock
|
|
47
41
|
end
|
48
42
|
|
49
43
|
def auth_params
|
50
|
-
params.require(:auth).permit
|
44
|
+
params.require(:auth).permit :email, :password
|
51
45
|
end
|
52
46
|
end
|
53
47
|
end
|
@@ -21,12 +21,7 @@ module Knock
|
|
21
21
|
if entity_class.respond_to? :from_token_payload
|
22
22
|
entity_class.from_token_payload @payload
|
23
23
|
else
|
24
|
-
|
25
|
-
warn "[DEPRECATION]: `Knock.current_user_from_token` is deprecated. Please implement `User.from_token_payload` instead."
|
26
|
-
Knock.current_user_from_token.call @payload
|
27
|
-
else
|
28
|
-
entity_class.find @payload['sub']
|
29
|
-
end
|
24
|
+
entity_class.find @payload['sub']
|
30
25
|
end
|
31
26
|
end
|
32
27
|
|
@@ -1,54 +1,5 @@
|
|
1
1
|
Knock.setup do |config|
|
2
2
|
|
3
|
-
## [DEPRECATED]
|
4
|
-
## This is deprecated in favor of `User.from_token_request`.
|
5
|
-
##
|
6
|
-
## User handle attribute
|
7
|
-
## ---------------------
|
8
|
-
##
|
9
|
-
## The attribute used to uniquely identify a user.
|
10
|
-
##
|
11
|
-
## Default:
|
12
|
-
# config.handle_attr = :email
|
13
|
-
|
14
|
-
## [DEPRECATED]
|
15
|
-
## This is deprecated in favor of `User.from_token_request`.
|
16
|
-
##
|
17
|
-
## Current user retrieval from handle when signing in
|
18
|
-
## --------------------------------------------------
|
19
|
-
##
|
20
|
-
## This is where you can configure how to retrieve the current user when
|
21
|
-
## signing in.
|
22
|
-
##
|
23
|
-
## Knock uses the `handle_attr` variable to retrieve the handle from the
|
24
|
-
## AuthTokenController parameters. It also uses the same variable to enforce
|
25
|
-
## permitted values in the controller.
|
26
|
-
##
|
27
|
-
## You must raise an exception if the resource cannot be retrieved.
|
28
|
-
## The type of the exception is configured in config.not_found_exception_class_name,
|
29
|
-
## and it is ActiveRecord::RecordNotFound by default
|
30
|
-
##
|
31
|
-
## Default:
|
32
|
-
# config.current_user_from_handle = -> (handle) { User.find_by! Knock.handle_attr => handle }
|
33
|
-
|
34
|
-
## [DEPRECATED]
|
35
|
-
## This is depreacted in favor of `User.from_token_payload`.
|
36
|
-
##
|
37
|
-
## Current user retrieval when validating token
|
38
|
-
## --------------------------------------------
|
39
|
-
##
|
40
|
-
## This is how you can tell Knock how to retrieve the current_user.
|
41
|
-
## By default, it assumes you have a model called `User` and that
|
42
|
-
## the user_id is stored in the 'sub' claim.
|
43
|
-
##
|
44
|
-
## You must raise an exception if the resource cannot be retrieved.
|
45
|
-
## The type of the exception is configured in config.not_found_exception_class_name,
|
46
|
-
## and it is ActiveRecord::RecordNotFound by default
|
47
|
-
##
|
48
|
-
## Default:
|
49
|
-
# config.current_user_from_token = -> (claims) { User.find claims['sub'] }
|
50
|
-
|
51
|
-
|
52
3
|
## Expiration claim
|
53
4
|
## ----------------
|
54
5
|
##
|
data/lib/knock.rb
CHANGED
@@ -1,16 +1,6 @@
|
|
1
1
|
require "knock/engine"
|
2
2
|
|
3
3
|
module Knock
|
4
|
-
|
5
|
-
mattr_accessor :handle_attr
|
6
|
-
self.handle_attr = :email
|
7
|
-
|
8
|
-
mattr_accessor :current_user_from_handle
|
9
|
-
self.current_user_from_handle = -> handle { User.find_by! Knock.handle_attr => handle }
|
10
|
-
|
11
|
-
mattr_accessor :current_user_from_token
|
12
|
-
self.current_user_from_token = -> claims { User.find claims['sub'] }
|
13
|
-
|
14
4
|
mattr_accessor :token_lifetime
|
15
5
|
self.token_lifetime = 1.day
|
16
6
|
|
data/lib/knock/authenticable.rb
CHANGED
@@ -1,29 +1,21 @@
|
|
1
1
|
module Knock::Authenticable
|
2
|
-
def authenticate
|
3
|
-
warn "[DEPRECATION]: `authenticate` is deprecated. Please use `authenticate_user` instead."
|
4
|
-
head(:unauthorized) unless authenticate_for(User)
|
5
|
-
end
|
6
|
-
|
7
2
|
def authenticate_for entity_class
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
begin
|
12
|
-
@entity = Knock::AuthToken.new(token: token).entity_for(entity_class)
|
13
|
-
define_current_entity_getter(entity_class)
|
14
|
-
@entity
|
15
|
-
rescue
|
16
|
-
nil
|
17
|
-
end
|
3
|
+
getter_name = "current_#{entity_class.to_s.underscore}"
|
4
|
+
define_current_entity_getter(entity_class, getter_name)
|
5
|
+
public_send(getter_name)
|
18
6
|
end
|
19
7
|
|
20
8
|
private
|
21
9
|
|
10
|
+
def token
|
11
|
+
params[:token] || token_from_request_headers
|
12
|
+
end
|
13
|
+
|
22
14
|
def method_missing(method, *args)
|
23
15
|
prefix, entity_name = method.to_s.split('_', 2)
|
24
16
|
case prefix
|
25
17
|
when 'authenticate'
|
26
|
-
|
18
|
+
unauthorized_entity(entity_name) unless authenticate_entity(entity_name)
|
27
19
|
when 'current'
|
28
20
|
authenticate_entity(entity_name)
|
29
21
|
else
|
@@ -36,17 +28,30 @@ module Knock::Authenticable
|
|
36
28
|
send(:authenticate_for, entity_class)
|
37
29
|
end
|
38
30
|
|
31
|
+
def unauthorized_entity(entity_name)
|
32
|
+
head(:unauthorized)
|
33
|
+
end
|
34
|
+
|
39
35
|
def token_from_request_headers
|
40
36
|
unless request.headers['Authorization'].nil?
|
41
37
|
request.headers['Authorization'].split.last
|
42
38
|
end
|
43
39
|
end
|
44
40
|
|
45
|
-
def define_current_entity_getter entity_class
|
46
|
-
getter_name = "current_#{entity_class.to_s.underscore}"
|
41
|
+
def define_current_entity_getter entity_class, getter_name
|
47
42
|
unless self.respond_to?(getter_name)
|
43
|
+
memoization_var_name = "@_#{getter_name}"
|
48
44
|
self.class.send(:define_method, getter_name) do
|
49
|
-
|
45
|
+
unless instance_variable_defined?(memoization_var_name)
|
46
|
+
current =
|
47
|
+
begin
|
48
|
+
Knock::AuthToken.new(token: token).entity_for(entity_class)
|
49
|
+
rescue
|
50
|
+
nil
|
51
|
+
end
|
52
|
+
instance_variable_set(memoization_var_name, current)
|
53
|
+
end
|
54
|
+
instance_variable_get(memoization_var_name)
|
50
55
|
end
|
51
56
|
end
|
52
57
|
end
|
data/lib/knock/version.rb
CHANGED
@@ -19,8 +19,10 @@ module Dummy
|
|
19
19
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
20
20
|
# config.i18n.default_locale = :de
|
21
21
|
|
22
|
-
|
23
|
-
|
22
|
+
unless Gem.loaded_specs["rails"].version.to_s =~ /^5/
|
23
|
+
# Do not swallow errors in after_commit/after_rollback callbacks.
|
24
|
+
config.active_record.raise_in_transactional_callbacks = true
|
25
|
+
end
|
24
26
|
end
|
25
27
|
end
|
26
28
|
|
@@ -13,8 +13,13 @@ Rails.application.configure do
|
|
13
13
|
config.eager_load = false
|
14
14
|
|
15
15
|
# Configure static file server for tests with Cache-Control for performance.
|
16
|
-
|
17
|
-
|
16
|
+
if Gem.loaded_specs["rails"].version.to_s.to_i >= 5
|
17
|
+
config.public_file_server.enabled = true
|
18
|
+
config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }
|
19
|
+
else
|
20
|
+
config.serve_static_files = true
|
21
|
+
config.static_cache_control = 'public, max-age=3600'
|
22
|
+
end
|
18
23
|
|
19
24
|
# Show full error reports and disable caching.
|
20
25
|
config.consider_all_requests_local = true
|
@@ -4,7 +4,5 @@ Knock.setup do |config|
|
|
4
4
|
config.token_public_key = nil
|
5
5
|
config.token_audience = nil
|
6
6
|
|
7
|
-
config.current_user_from_handle = -> handle { User.find_by(Knock.handle_attr => handle) || raise(Knock::MyCustomException) }
|
8
|
-
config.current_user_from_token = -> claims { User.find_by(id: claims['sub']) || raise(Knock::MyCustomException) }
|
9
7
|
config.not_found_exception_class_name = 'Knock::MyCustomException'
|
10
8
|
end
|
data/test/dummy/config/routes.rb
CHANGED
data/test/dummy/db/schema.rb
CHANGED
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/test/dummy/log/test.log
CHANGED
@@ -1,406 +1,427 @@
|
|
1
|
-
[1m[
|
2
|
-
[1m[35m (
|
3
|
-
[1m[
|
4
|
-
|
5
|
-
[1m[
|
6
|
-
[1m[35m (0.
|
7
|
-
[1m[
|
8
|
-
[1m[35m (
|
9
|
-
|
10
|
-
[1m[35m (
|
11
|
-
[1m[
|
12
|
-
[1m[
|
13
|
-
[1m[
|
14
|
-
|
15
|
-
[1m[
|
16
|
-
[1m[
|
17
|
-
[1m[
|
18
|
-
[1m[
|
19
|
-
|
20
|
-
[1m[
|
21
|
-
[1m[
|
22
|
-
[1m[
|
23
|
-
[1m[
|
24
|
-
[1m[
|
25
|
-
[1m[
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
[1m[
|
33
|
-
[1m[
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
[1m[35m (
|
41
|
-
[1m[
|
42
|
-
-----------------------------------------------------------------------------
|
43
|
-
VendorProtectedControllerTest: test_has_a_current_vendor_after_authentication
|
44
|
-
-----------------------------------------------------------------------------
|
45
|
-
[1m[35mVendor Load (0.2ms)[0m SELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT 1 [["id", 980190962]]
|
46
|
-
Processing by VendorProtectedController#index as HTML
|
47
|
-
[1m[36mVendor Load (0.1ms)[0m [1mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT 1[0m [["id", 980190962]]
|
48
|
-
Completed 200 OK in 2ms (ActiveRecord: 0.1ms)
|
49
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
50
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
51
|
-
-------------------------------------------------------------------------------
|
52
|
-
VendorProtectedControllerTest: test_responds_with_unauthorized_to_invalid_token
|
53
|
-
-------------------------------------------------------------------------------
|
54
|
-
Processing by VendorProtectedController#index as HTML
|
55
|
-
Filter chain halted as :authenticate_vendor rendered or redirected
|
56
|
-
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
57
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
58
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
59
|
-
--------------------------------------------------------------------------------
|
60
|
-
VendorProtectedControllerTest: test_responds_with_unauthorized_to_invalid_entity
|
61
|
-
--------------------------------------------------------------------------------
|
62
|
-
Processing by VendorProtectedController#index as HTML
|
63
|
-
[1m[35mVendor Load (0.1ms)[0m SELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT 1 [["id", 0]]
|
64
|
-
Filter chain halted as :authenticate_vendor rendered or redirected
|
65
|
-
Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms)
|
66
|
-
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
67
|
-
[1m[35m (0.0ms)[0m begin transaction
|
68
|
-
--------------------------------------------------------------------------
|
69
|
-
VendorProtectedControllerTest: test_responds_with_success_if_authenticated
|
70
|
-
--------------------------------------------------------------------------
|
71
|
-
[1m[36mVendor Load (0.1ms)[0m [1mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT 1[0m [["id", 980190962]]
|
72
|
-
Processing by VendorProtectedController#index as HTML
|
73
|
-
[1m[35mVendor Load (0.0ms)[0m SELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT 1 [["id", 980190962]]
|
74
|
-
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
75
|
-
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
76
|
-
[1m[35m (0.1ms)[0m begin transaction
|
77
|
-
--------------------------------------------------------------------------------------------
|
78
|
-
CompositeNameEntityProtectedControllerTest: test_responds_with_unauthorized_to_invalid_token
|
79
|
-
--------------------------------------------------------------------------------------------
|
80
|
-
Processing by CompositeNameEntityProtectedController#index as HTML
|
81
|
-
Filter chain halted as :authenticate_composite_name_entity rendered or redirected
|
82
|
-
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
83
|
-
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
84
|
-
[1m[35m (0.0ms)[0m begin transaction
|
85
|
-
---------------------------------------------------------------------------------------------
|
86
|
-
CompositeNameEntityProtectedControllerTest: test_responds_with_unauthorized_to_invalid_entity
|
87
|
-
---------------------------------------------------------------------------------------------
|
88
|
-
Processing by CompositeNameEntityProtectedController#index as HTML
|
89
|
-
[1m[36mCompositeNameEntity Load (0.1ms)[0m [1mSELECT "composite_name_entities".* FROM "composite_name_entities" WHERE "composite_name_entities"."id" = ? LIMIT 1[0m [["id", 0]]
|
90
|
-
Filter chain halted as :authenticate_composite_name_entity rendered or redirected
|
91
|
-
Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms)
|
92
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
93
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
94
|
-
---------------------------------------------------------------------------------------------------------
|
95
|
-
CompositeNameEntityProtectedControllerTest: test_has_a_current_composite_name_entity_after_authentication
|
96
|
-
---------------------------------------------------------------------------------------------------------
|
97
|
-
[1m[35mCompositeNameEntity Load (0.1ms)[0m SELECT "composite_name_entities".* FROM "composite_name_entities" WHERE "composite_name_entities"."id" = ? LIMIT 1 [["id", 980190962]]
|
98
|
-
Processing by CompositeNameEntityProtectedController#index as HTML
|
99
|
-
[1m[36mCompositeNameEntity Load (0.1ms)[0m [1mSELECT "composite_name_entities".* FROM "composite_name_entities" WHERE "composite_name_entities"."id" = ? LIMIT 1[0m [["id", 980190962]]
|
100
|
-
Completed 200 OK in 1ms (ActiveRecord: 0.1ms)
|
101
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
102
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
103
|
-
---------------------------------------------------------------------------------------
|
104
|
-
CompositeNameEntityProtectedControllerTest: test_responds_with_success_if_authenticated
|
105
|
-
---------------------------------------------------------------------------------------
|
106
|
-
[1m[35mCompositeNameEntity Load (0.1ms)[0m SELECT "composite_name_entities".* FROM "composite_name_entities" WHERE "composite_name_entities"."id" = ? LIMIT 1 [["id", 980190962]]
|
107
|
-
Processing by CompositeNameEntityProtectedController#index as HTML
|
108
|
-
[1m[36mCompositeNameEntity Load (0.0ms)[0m [1mSELECT "composite_name_entities".* FROM "composite_name_entities" WHERE "composite_name_entities"."id" = ? LIMIT 1[0m [["id", 980190962]]
|
109
|
-
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
110
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
111
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
112
|
-
---------------------------------------------------------------------------
|
113
|
-
CompositeNameEntityProtectedControllerTest: test_responds_with_unauthorized
|
114
|
-
---------------------------------------------------------------------------
|
115
|
-
Processing by CompositeNameEntityProtectedController#index as HTML
|
116
|
-
Filter chain halted as :authenticate_composite_name_entity rendered or redirected
|
117
|
-
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
118
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
119
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
120
|
-
-------------------------------------------------------------------------
|
121
|
-
Knock::AuthTokenTest: test_verify_audience_when_token_audience_is_present
|
122
|
-
-------------------------------------------------------------------------
|
123
|
-
[1m[35m (0.0ms)[0m rollback transaction
|
124
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
125
|
-
---------------------------------------------------------------
|
126
|
-
Knock::AuthTokenTest: test_validate_expiration_claim_by_default
|
127
|
-
---------------------------------------------------------------
|
128
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
129
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
130
|
-
----------------------------------------------------
|
131
|
-
Knock::AuthTokenTest: test_decode_RSA_encoded_tokens
|
132
|
-
----------------------------------------------------
|
133
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
134
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
135
|
-
---------------------------------------------------------------------------------------
|
136
|
-
Knock::AuthTokenTest: test_does_not_validate_expiration_claim_with_a_nil_token_lifetime
|
137
|
-
---------------------------------------------------------------------------------------
|
138
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
139
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
140
|
-
-------------------------------------------------
|
141
|
-
Knock::AuthTokenTest: test_encode_tokens_with_RSA
|
142
|
-
-------------------------------------------------
|
143
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
144
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
145
|
-
-------------------------------------------
|
146
|
-
Knock::AuthTokenTest: test_verify_algorithm
|
147
|
-
-------------------------------------------
|
148
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
149
|
-
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
150
|
-
------------------------------------------
|
151
|
-
Knock::AuthTokenTest: test_is_serializable
|
152
|
-
------------------------------------------
|
153
|
-
[1m[35m (0.0ms)[0m rollback transaction
|
154
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
155
|
-
----------------------------------------------------------------------------------------------
|
156
|
-
ProtectedResourcesControllerTest: test_responds_with_unauthorized_with_invalid_token_in_header
|
157
|
-
----------------------------------------------------------------------------------------------
|
158
|
-
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
|
159
|
-
Processing by ProtectedResourcesController#index as HTML
|
160
|
-
Filter chain halted as :authenticate rendered or redirected
|
161
|
-
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
162
|
-
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
163
|
-
[1m[35m (0.0ms)[0m begin transaction
|
1
|
+
[1m[35m (7.3ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)[0m
|
2
|
+
[1m[35m (7.4ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
3
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
4
|
+
Migrating to CreateUsers (20150713101607)
|
5
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
6
|
+
[1m[35m (0.3ms)[0m [1m[35mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar NOT NULL, "password_digest" varchar NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
7
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20150713101607"]]
|
8
|
+
[1m[35m (2.0ms)[0m [1m[36mcommit transaction[0m
|
9
|
+
Migrating to CreateAdmins (20160519075733)
|
10
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
11
|
+
[1m[35m (0.2ms)[0m [1m[35mCREATE TABLE "admins" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar, "password_digest" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
12
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20160519075733"]]
|
13
|
+
[1m[35m (6.8ms)[0m [1m[36mcommit transaction[0m
|
14
|
+
Migrating to CreateVendors (20160522051816)
|
15
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
16
|
+
[1m[35m (0.2ms)[0m [1m[35mCREATE TABLE "vendors" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar, "password_digest" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
17
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20160522051816"]]
|
18
|
+
[1m[35m (6.9ms)[0m [1m[36mcommit transaction[0m
|
19
|
+
Migrating to CreateCompositeNameEntities (20160522181712)
|
20
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
21
|
+
[1m[35m (0.2ms)[0m [1m[35mCREATE TABLE "composite_name_entities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar, "password_digest" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)[0m
|
22
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20160522181712"]]
|
23
|
+
[1m[35m (6.8ms)[0m [1m[36mcommit transaction[0m
|
24
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.1ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ?[0m [["key", :environment], ["LIMIT", 1]]
|
25
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
26
|
+
[1m[35mSQL (0.1ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["key", "environment"], ["value", "test"], ["created_at", 2016-10-23 11:46:54 UTC], ["updated_at", 2016-10-23 11:46:54 UTC]]
|
27
|
+
[1m[35m (9.4ms)[0m [1m[36mcommit transaction[0m
|
28
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
29
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
30
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
31
|
+
[1m[36mFixture Delete (0.2ms)[0m [1m[31mDELETE FROM "admins"[0m
|
32
|
+
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "admins" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('admin.one@example.net', '$2a$04$L0e6QDD.KUi7.R484p7.CuLHnDQ1237SVHPBXc1TuVkJkK22jpKVS', '2016-10-23 11:46:57.543558', '2016-10-23 11:46:57.543558', 980190962)[0m
|
33
|
+
[1m[36mFixture Delete (0.1ms)[0m [1m[31mDELETE FROM "composite_name_entities"[0m
|
34
|
+
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "composite_name_entities" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('composite_name_entity.one@example.net', '$2a$04$C3CqIofHrsAY14.9KrzXceL/bYXVODgVNloqhRiYYJek3Pak5ABhW', '2016-10-23 11:46:57.547469', '2016-10-23 11:46:57.547469', 980190962)[0m
|
35
|
+
[1m[36mFixture Delete (0.1ms)[0m [1m[31mDELETE FROM "users"[0m
|
36
|
+
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "users" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('one@example.net', '$2a$04$7Z3pv.bB1PLx4/uSlbmwBe98I/G.MYZT8I0SMEZY.WXHtFiJctThG', '2016-10-23 11:46:57.549261', '2016-10-23 11:46:57.549261', 980190962)[0m
|
37
|
+
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "users" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('two@example.net', '$2a$04$Rdgg23Sm9JHF9v6igZBGbODJ3sF2Q2Isa3AOZa7AeC2X02nu9VZI6', '2016-10-23 11:46:57.549261', '2016-10-23 11:46:57.549261', 298486374)[0m
|
38
|
+
[1m[36mFixture Delete (0.1ms)[0m [1m[31mDELETE FROM "vendors"[0m
|
39
|
+
[1m[36mFixture Insert (0.1ms)[0m [1m[32mINSERT INTO "vendors" ("email", "password_digest", "created_at", "updated_at", "id") VALUES ('vendor.one@example.net', '$2a$04$c6LF45dpUDzY4pDnbxipb.DzdalR.IBnD84VgVHmA9w9QG1p6szZy', '2016-10-23 11:46:57.551369', '2016-10-23 11:46:57.551369', 980190962)[0m
|
40
|
+
[1m[35m (2.1ms)[0m [1m[36mcommit transaction[0m
|
41
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
164
42
|
----------------------------------------------------------------------------------
|
165
43
|
ProtectedResourcesControllerTest: test_accepts_authorization_header_without_prefix
|
166
44
|
----------------------------------------------------------------------------------
|
167
|
-
[1m[36mUser Load (0.
|
45
|
+
[1m[36mUser Load (0.3ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
168
46
|
Processing by ProtectedResourcesController#index as HTML
|
169
|
-
[1m[
|
170
|
-
Completed 200 OK in
|
171
|
-
[1m[
|
172
|
-
[1m[35m (0.1ms)[0m
|
47
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
48
|
+
Completed 200 OK in 4ms (ActiveRecord: 0.1ms)
|
49
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
50
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
51
|
+
----------------------------------------------------------------------------------------------
|
52
|
+
ProtectedResourcesControllerTest: test_responds_with_unauthorized_with_invalid_token_in_header
|
53
|
+
----------------------------------------------------------------------------------------------
|
54
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
55
|
+
Processing by ProtectedResourcesController#index as HTML
|
56
|
+
Filter chain halted as :authenticate_user rendered or redirected
|
57
|
+
Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms)
|
58
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
59
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
173
60
|
-------------------------------------------------------------------------------------------
|
174
61
|
ProtectedResourcesControllerTest: test_responds_with_unauthorized_with_invalid_token_in_url
|
175
62
|
-------------------------------------------------------------------------------------------
|
176
|
-
[1m[36mUser Load (0.1ms)[0m [
|
63
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
177
64
|
Processing by ProtectedResourcesController#index as HTML
|
178
65
|
Parameters: {"token"=>"invalid"}
|
179
|
-
Filter chain halted as :
|
66
|
+
Filter chain halted as :authenticate_user rendered or redirected
|
180
67
|
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
181
|
-
[1m[35m (0.1ms)[0m
|
182
|
-
[1m[
|
68
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
69
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
183
70
|
------------------------------------------------------------------------------
|
184
|
-
ProtectedResourcesControllerTest:
|
71
|
+
ProtectedResourcesControllerTest: test_has_a_current_user_after_authentication
|
185
72
|
------------------------------------------------------------------------------
|
186
|
-
[1m[
|
73
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
187
74
|
Processing by ProtectedResourcesController#index as HTML
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
[1m[35m (0.1ms)[0m
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
|
75
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
76
|
+
Completed 200 OK in 1ms (ActiveRecord: 0.1ms)
|
77
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
78
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
79
|
+
---------------------------------------------------------------------------------------
|
80
|
+
ProtectedResourcesControllerTest: test_responds_with_success_with_valid_token_in_header
|
81
|
+
---------------------------------------------------------------------------------------
|
82
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
197
83
|
Processing by ProtectedResourcesController#index as HTML
|
198
|
-
|
199
|
-
Completed
|
200
|
-
[1m[
|
201
|
-
[1m[35m (0.0ms)[0m
|
84
|
+
[1m[36mUser Load (0.0ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
85
|
+
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
86
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
87
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
202
88
|
-------------------------------------------------------------------------------------
|
203
89
|
ProtectedResourcesControllerTest: test_accepts_any_prefix_in_the_authorization_header
|
204
90
|
-------------------------------------------------------------------------------------
|
205
|
-
[1m[36mUser Load (0.1ms)[0m [
|
91
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
206
92
|
Processing by ProtectedResourcesController#index as HTML
|
207
|
-
[1m[
|
208
|
-
Completed 200 OK in 1ms (ActiveRecord: 0.
|
209
|
-
[1m[
|
210
|
-
[1m[35m (0.
|
93
|
+
[1m[36mUser Load (0.0ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
94
|
+
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
95
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
96
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
97
|
+
-----------------------------------------------------------------
|
98
|
+
ProtectedResourcesControllerTest: test_responds_with_unauthorized
|
99
|
+
-----------------------------------------------------------------
|
100
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
101
|
+
Processing by ProtectedResourcesController#index as HTML
|
102
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", nil], ["LIMIT", 1]]
|
103
|
+
Filter chain halted as :authenticate_user rendered or redirected
|
104
|
+
Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms)
|
105
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
106
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
211
107
|
------------------------------------------------------------------------------
|
212
|
-
ProtectedResourcesControllerTest:
|
108
|
+
ProtectedResourcesControllerTest: test_responds_with_success_with_token_in_url
|
213
109
|
------------------------------------------------------------------------------
|
214
|
-
[1m[36mUser Load (0.1ms)[0m [
|
215
|
-
Processing by ProtectedResourcesController#index as HTML
|
216
|
-
[1m[35mUser Load (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
|
217
|
-
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
218
|
-
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
219
|
-
[1m[35m (0.0ms)[0m begin transaction
|
220
|
-
---------------------------------------------------------------------------------------
|
221
|
-
ProtectedResourcesControllerTest: test_responds_with_success_with_valid_token_in_header
|
222
|
-
---------------------------------------------------------------------------------------
|
223
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190962]]
|
110
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
224
111
|
Processing by ProtectedResourcesController#index as HTML
|
225
|
-
|
226
|
-
|
227
|
-
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
228
|
-
[1m[35m (0.1ms)[0m begin transaction
|
229
|
-
--------------------------------------------------
|
230
|
-
CurrentUsersControllerTest: test_responds_with_200
|
231
|
-
--------------------------------------------------
|
232
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190962]]
|
233
|
-
Processing by CurrentUsersController#show as HTML
|
234
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 980190962]]
|
112
|
+
Parameters: {"token"=>"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0NzczMDk2MTcsInN1YiI6OTgwMTkwOTYyfQ.Q04ydbtUVZsmqb3dfESRqBJKBfbiomA4XZXFO35kNv8"}
|
113
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
235
114
|
Completed 200 OK in 1ms (ActiveRecord: 0.1ms)
|
236
|
-
[1m[
|
237
|
-
[1m[35m (0.0ms)[0m
|
238
|
-
---------------------------------------------------------------------------
|
239
|
-
CurrentUsersControllerTest: test_responds_with_404_if_user_is_not_logged_in
|
240
|
-
---------------------------------------------------------------------------
|
241
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190962]]
|
242
|
-
Processing by CurrentUsersController#show as HTML
|
243
|
-
Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)
|
244
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
245
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
246
|
-
----------------------------------------------------------------
|
247
|
-
InstallGeneratorTest: test_Assert_all_files_are_properly_created
|
248
|
-
----------------------------------------------------------------
|
249
|
-
[1m[35m (0.1ms)[0m rollback transaction
|
250
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
251
|
-
---------------------------------------
|
252
|
-
KnockTest: test_setup_block_yields_self
|
253
|
-
---------------------------------------
|
254
|
-
[1m[35m (0.0ms)[0m rollback transaction
|
255
|
-
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
115
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
116
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
256
117
|
------------------------------------------------------------------------
|
257
118
|
VendorTokenControllerTest: test_responds_with_404_if_user_does_not_exist
|
258
119
|
------------------------------------------------------------------------
|
259
|
-
[1m[
|
120
|
+
[1m[36mVendor Load (0.2ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
260
121
|
Processing by VendorTokenController#create as HTML
|
261
122
|
Parameters: {"auth"=>{"email"=>"wrong@example.net", "password"=>"[FILTERED]"}}
|
262
|
-
[1m[36mVendor Load (0.
|
263
|
-
Completed 404 Not Found in
|
264
|
-
[1m[35m (0.1ms)[0m
|
265
|
-
[1m[
|
123
|
+
[1m[36mVendor Load (0.3ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."email" = ? LIMIT ?[0m [["email", "wrong@example.net"], ["LIMIT", 1]]
|
124
|
+
Completed 404 Not Found in 3ms (ActiveRecord: 0.3ms)
|
125
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
126
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
127
|
+
-------------------------------------------------
|
128
|
+
VendorTokenControllerTest: test_responds_with_201
|
129
|
+
-------------------------------------------------
|
130
|
+
[1m[36mVendor Load (0.1ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
131
|
+
Processing by VendorTokenController#create as HTML
|
132
|
+
Parameters: {"auth"=>{"email"=>"vendor.one@example.net", "password"=>"[FILTERED]"}}
|
133
|
+
[1m[36mVendor Load (0.1ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."email" = ? LIMIT ?[0m [["email", "vendor.one@example.net"], ["LIMIT", 1]]
|
134
|
+
Completed 201 Created in 4ms (Views: 0.4ms | ActiveRecord: 0.1ms)
|
135
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
136
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
266
137
|
------------------------------------------------------------------------
|
267
138
|
VendorTokenControllerTest: test_responds_with_404_if_password_is_invalid
|
268
139
|
------------------------------------------------------------------------
|
269
|
-
[1m[
|
140
|
+
[1m[36mVendor Load (0.1ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
270
141
|
Processing by VendorTokenController#create as HTML
|
271
142
|
Parameters: {"auth"=>{"email"=>"vendor.one@example.net", "password"=>"[FILTERED]"}}
|
272
|
-
[1m[36mVendor Load (0.1ms)[0m [
|
273
|
-
Completed 404 Not Found in
|
274
|
-
[1m[35m (0.1ms)[0m
|
275
|
-
[1m[
|
143
|
+
[1m[36mVendor Load (0.1ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."email" = ? LIMIT ?[0m [["email", "vendor.one@example.net"], ["LIMIT", 1]]
|
144
|
+
Completed 404 Not Found in 3ms (ActiveRecord: 0.1ms)
|
145
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
146
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
147
|
+
---------------------------------------------------------------------------------------
|
148
|
+
Knock::AuthTokenTest: test_does_not_validate_expiration_claim_with_a_nil_token_lifetime
|
149
|
+
---------------------------------------------------------------------------------------
|
150
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
151
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
152
|
+
---------------------------------------------------------------
|
153
|
+
Knock::AuthTokenTest: test_validate_expiration_claim_by_default
|
154
|
+
---------------------------------------------------------------
|
155
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
156
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
157
|
+
-------------------------------------------
|
158
|
+
Knock::AuthTokenTest: test_verify_algorithm
|
159
|
+
-------------------------------------------
|
160
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
161
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
162
|
+
----------------------------------------------------
|
163
|
+
Knock::AuthTokenTest: test_decode_RSA_encoded_tokens
|
164
|
+
----------------------------------------------------
|
165
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
166
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
276
167
|
-------------------------------------------------
|
277
|
-
|
168
|
+
Knock::AuthTokenTest: test_encode_tokens_with_RSA
|
278
169
|
-------------------------------------------------
|
279
|
-
[1m[
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
[1m[35m (0.
|
285
|
-
[1m[
|
286
|
-
-------------------------------------------------------------------------------
|
287
|
-
AdminProtectedControllerTest: test_responds_with_unauthorized_to_invalid_entity
|
288
|
-
-------------------------------------------------------------------------------
|
289
|
-
Processing by AdminProtectedController#index as HTML
|
290
|
-
[1m[35mAdmin Load (0.1ms)[0m SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 0]]
|
291
|
-
Filter chain halted as :authenticate_admin rendered or redirected
|
292
|
-
Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms)
|
293
|
-
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
294
|
-
[1m[35m (0.0ms)[0m begin transaction
|
170
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
171
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
172
|
+
------------------------------------------
|
173
|
+
Knock::AuthTokenTest: test_is_serializable
|
174
|
+
------------------------------------------
|
175
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
176
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
295
177
|
-------------------------------------------------------------------------
|
296
|
-
|
178
|
+
Knock::AuthTokenTest: test_verify_audience_when_token_audience_is_present
|
297
179
|
-------------------------------------------------------------------------
|
298
|
-
[1m[
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
[1m[
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
311
|
-
[1m[35m (0.1ms)[0m begin transaction
|
312
|
-
-------------------------------------------------------------
|
313
|
-
AdminProtectedControllerTest: test_responds_with_unauthorized
|
314
|
-
-------------------------------------------------------------
|
315
|
-
Processing by AdminProtectedController#index as HTML
|
316
|
-
Filter chain halted as :authenticate_admin rendered or redirected
|
317
|
-
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
318
|
-
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
319
|
-
[1m[35m (0.0ms)[0m begin transaction
|
320
|
-
---------------------------------------------------------------------------
|
321
|
-
AdminProtectedControllerTest: test_has_a_current_admin_after_authentication
|
322
|
-
---------------------------------------------------------------------------
|
323
|
-
[1m[36mAdmin Load (0.1ms)[0m [1mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1[0m [["id", 980190962]]
|
324
|
-
Processing by AdminProtectedController#index as HTML
|
325
|
-
[1m[35mAdmin Load (0.1ms)[0m SELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT 1 [["id", 980190962]]
|
326
|
-
Completed 200 OK in 1ms (ActiveRecord: 0.1ms)
|
327
|
-
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
328
|
-
[1m[35m (0.1ms)[0m begin transaction
|
180
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
181
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
182
|
+
-----------------------------------------------------------------------
|
183
|
+
AdminTokenControllerTest: test_responds_with_404_if_user_does_not_exist
|
184
|
+
-----------------------------------------------------------------------
|
185
|
+
[1m[36mAdmin Load (0.2ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
186
|
+
Processing by AdminTokenController#create as HTML
|
187
|
+
Parameters: {"auth"=>{"email"=>"wrong@example.net", "password"=>"[FILTERED]"}}
|
188
|
+
[1m[36mAdmin Load (0.1ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."email" = ? LIMIT ?[0m [["email", "wrong@example.net"], ["LIMIT", 1]]
|
189
|
+
Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)
|
190
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
191
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
329
192
|
------------------------------------------------
|
330
193
|
AdminTokenControllerTest: test_responds_with_201
|
331
194
|
------------------------------------------------
|
332
|
-
[1m[36mAdmin Load (0.1ms)[0m [
|
195
|
+
[1m[36mAdmin Load (0.1ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
333
196
|
Processing by AdminTokenController#create as HTML
|
334
197
|
Parameters: {"auth"=>{"email"=>"admin.one@example.net", "password"=>"[FILTERED]"}}
|
335
|
-
[1m[
|
198
|
+
[1m[36mAdmin Load (0.1ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."email" = ? LIMIT ?[0m [["email", "admin.one@example.net"], ["LIMIT", 1]]
|
336
199
|
Completed 201 Created in 3ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
337
|
-
[1m[
|
338
|
-
[1m[35m (0.0ms)[0m
|
200
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
201
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
339
202
|
-----------------------------------------------------------------------
|
340
203
|
AdminTokenControllerTest: test_responds_with_404_if_password_is_invalid
|
341
204
|
-----------------------------------------------------------------------
|
342
|
-
[1m[36mAdmin Load (0.1ms)[0m [
|
205
|
+
[1m[36mAdmin Load (0.1ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
343
206
|
Processing by AdminTokenController#create as HTML
|
344
207
|
Parameters: {"auth"=>{"email"=>"admin.one@example.net", "password"=>"[FILTERED]"}}
|
345
|
-
[1m[
|
346
|
-
Completed 404 Not Found in 2ms (ActiveRecord: 0.
|
347
|
-
[1m[
|
348
|
-
[1m[35m (0.0ms)[0m
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
[1m[
|
353
|
-
Processing by
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
[1m[
|
358
|
-
|
208
|
+
[1m[36mAdmin Load (0.1ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."email" = ? LIMIT ?[0m [["email", "admin.one@example.net"], ["LIMIT", 1]]
|
209
|
+
Completed 404 Not Found in 2ms (ActiveRecord: 0.1ms)
|
210
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
211
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
212
|
+
--------------------------------------------------
|
213
|
+
CurrentUsersControllerTest: test_responds_with_200
|
214
|
+
--------------------------------------------------
|
215
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
216
|
+
Processing by CurrentUsersController#show as HTML
|
217
|
+
[1m[36mUser Load (0.0ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
218
|
+
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
219
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
220
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
221
|
+
-----------------------------------------------------
|
222
|
+
CurrentUsersControllerTest: test_responds_with_200_#2
|
223
|
+
-----------------------------------------------------
|
224
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
225
|
+
Processing by CurrentUsersController#show as HTML
|
226
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
227
|
+
Completed 200 OK in 1ms (ActiveRecord: 0.1ms)
|
228
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
229
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
230
|
+
---------------------------------------------------------------------------
|
231
|
+
CurrentUsersControllerTest: test_responds_with_404_if_user_is_not_logged_in
|
232
|
+
---------------------------------------------------------------------------
|
233
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
234
|
+
Processing by CurrentUsersController#show as HTML
|
235
|
+
[1m[36mUser Load (0.0ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", nil], ["LIMIT", 1]]
|
236
|
+
Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)
|
237
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
238
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
359
239
|
-----------------------------------------------------------------------------
|
360
|
-
|
240
|
+
VendorProtectedControllerTest: test_raises_method_missing_error_appropriately
|
361
241
|
-----------------------------------------------------------------------------
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
[1m[
|
366
|
-
|
367
|
-
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
368
|
-
[1m[35m (0.1ms)[0m begin transaction
|
369
|
-
------------------------------------------------------
|
370
|
-
Knock::AuthTokenControllerTest: test_responds_with_201
|
371
|
-
------------------------------------------------------
|
372
|
-
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1[0m [["id", 980190962]]
|
373
|
-
Processing by Knock::AuthTokenController#create as HTML
|
374
|
-
Parameters: {"auth"=>{"email"=>"one@example.net", "password"=>"[FILTERED]"}}
|
375
|
-
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT 1 [["email", "one@example.net"]]
|
376
|
-
Completed 201 Created in 3ms (Views: 0.2ms | ActiveRecord: 0.1ms)
|
377
|
-
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
378
|
-
[1m[35m (0.0ms)[0m begin transaction
|
242
|
+
Processing by VendorProtectedController#show as HTML
|
243
|
+
Parameters: {"id"=>"1"}
|
244
|
+
Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms)
|
245
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
246
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
379
247
|
-----------------------------------------------------------------------------
|
380
|
-
|
248
|
+
VendorProtectedControllerTest: test_has_a_current_vendor_after_authentication
|
381
249
|
-----------------------------------------------------------------------------
|
382
|
-
|
383
|
-
|
384
|
-
[1m[
|
250
|
+
[1m[36mVendor Load (0.1ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
251
|
+
Processing by VendorProtectedController#index as HTML
|
252
|
+
[1m[36mVendor Load (0.0ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
253
|
+
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
254
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
255
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
256
|
+
--------------------------------------------------------------------------------
|
257
|
+
VendorProtectedControllerTest: test_responds_with_unauthorized_to_invalid_entity
|
258
|
+
--------------------------------------------------------------------------------
|
259
|
+
Processing by VendorProtectedController#index as HTML
|
260
|
+
[1m[36mVendor Load (0.1ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT ?[0m [["id", 0], ["LIMIT", 1]]
|
261
|
+
Filter chain halted as :authenticate_vendor rendered or redirected
|
262
|
+
Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms)
|
263
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
264
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
265
|
+
--------------------------------------------------------------------------
|
266
|
+
VendorProtectedControllerTest: test_responds_with_success_if_authenticated
|
267
|
+
--------------------------------------------------------------------------
|
268
|
+
[1m[36mVendor Load (0.1ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
269
|
+
Processing by VendorProtectedController#index as HTML
|
270
|
+
[1m[36mVendor Load (0.0ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
271
|
+
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
272
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
273
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
274
|
+
--------------------------------------------------------------
|
275
|
+
VendorProtectedControllerTest: test_responds_with_unauthorized
|
276
|
+
--------------------------------------------------------------
|
277
|
+
Processing by VendorProtectedController#index as HTML
|
278
|
+
[1m[36mVendor Load (0.1ms)[0m [1m[34mSELECT "vendors".* FROM "vendors" WHERE "vendors"."id" = ? LIMIT ?[0m [["id", nil], ["LIMIT", 1]]
|
279
|
+
Filter chain halted as :authenticate_vendor rendered or redirected
|
280
|
+
Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms)
|
281
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
282
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
283
|
+
-------------------------------------------------------------------------------
|
284
|
+
VendorProtectedControllerTest: test_responds_with_unauthorized_to_invalid_token
|
285
|
+
-------------------------------------------------------------------------------
|
286
|
+
Processing by VendorProtectedController#index as HTML
|
287
|
+
Filter chain halted as :authenticate_vendor rendered or redirected
|
288
|
+
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
289
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
290
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
291
|
+
--------------------------------------------------------------------
|
292
|
+
CustomUnauthorizedEntityControllerTest: test_responds_with_not_found
|
293
|
+
--------------------------------------------------------------------
|
294
|
+
Processing by CustomUnauthorizedEntityController#index as HTML
|
295
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", nil], ["LIMIT", 1]]
|
296
|
+
Filter chain halted as :authenticate_user rendered or redirected
|
385
297
|
Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)
|
386
|
-
[1m[35m (0.1ms)[0m
|
387
|
-
[1m[
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
[1m[
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
[1m[
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
[1m[
|
298
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
299
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
300
|
+
--------------------------------------------------------------------------------------
|
301
|
+
CustomUnauthorizedEntityControllerTest: test_responds_with_not_found_to_invalid_entity
|
302
|
+
--------------------------------------------------------------------------------------
|
303
|
+
Processing by CustomUnauthorizedEntityController#index as HTML
|
304
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 0], ["LIMIT", 1]]
|
305
|
+
Filter chain halted as :authenticate_user rendered or redirected
|
306
|
+
Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)
|
307
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
308
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
309
|
+
-----------------------------------------------------------------------------------
|
310
|
+
CustomUnauthorizedEntityControllerTest: test_responds_with_success_if_authenticated
|
311
|
+
-----------------------------------------------------------------------------------
|
312
|
+
[1m[36mUser Load (0.1ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
313
|
+
Processing by CustomUnauthorizedEntityController#index as HTML
|
314
|
+
[1m[36mUser Load (0.0ms)[0m [1m[34mSELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
315
|
+
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
316
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
317
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
318
|
+
-------------------------------------------------------------------------------------
|
319
|
+
CustomUnauthorizedEntityControllerTest: test_responds_with_not_found_to_invalid_token
|
320
|
+
-------------------------------------------------------------------------------------
|
321
|
+
Processing by CustomUnauthorizedEntityController#index as HTML
|
322
|
+
Filter chain halted as :authenticate_user rendered or redirected
|
323
|
+
Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)
|
324
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
325
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
403
326
|
------------------------------------------------------------------------
|
404
327
|
TokenControllerGeneratorTest: test_assert_all_files_are_properly_created
|
405
328
|
------------------------------------------------------------------------
|
406
|
-
[1m[35m (0.1ms)[0m
|
329
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
330
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
331
|
+
---------------------------------------------------------------------------
|
332
|
+
CompositeNameEntityProtectedControllerTest: test_responds_with_unauthorized
|
333
|
+
---------------------------------------------------------------------------
|
334
|
+
Processing by CompositeNameEntityProtectedController#index as HTML
|
335
|
+
[1m[36mCompositeNameEntity Load (0.1ms)[0m [1m[34mSELECT "composite_name_entities".* FROM "composite_name_entities" WHERE "composite_name_entities"."id" = ? LIMIT ?[0m [["id", nil], ["LIMIT", 1]]
|
336
|
+
Filter chain halted as :authenticate_composite_name_entity rendered or redirected
|
337
|
+
Completed 401 Unauthorized in 2ms (ActiveRecord: 0.1ms)
|
338
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
339
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
340
|
+
--------------------------------------------------------------------------------------------
|
341
|
+
CompositeNameEntityProtectedControllerTest: test_responds_with_unauthorized_to_invalid_token
|
342
|
+
--------------------------------------------------------------------------------------------
|
343
|
+
Processing by CompositeNameEntityProtectedController#index as HTML
|
344
|
+
Filter chain halted as :authenticate_composite_name_entity rendered or redirected
|
345
|
+
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
346
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
347
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
348
|
+
---------------------------------------------------------------------------------------------------------
|
349
|
+
CompositeNameEntityProtectedControllerTest: test_has_a_current_composite_name_entity_after_authentication
|
350
|
+
---------------------------------------------------------------------------------------------------------
|
351
|
+
[1m[36mCompositeNameEntity Load (0.1ms)[0m [1m[34mSELECT "composite_name_entities".* FROM "composite_name_entities" WHERE "composite_name_entities"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
352
|
+
Processing by CompositeNameEntityProtectedController#index as HTML
|
353
|
+
[1m[36mCompositeNameEntity Load (0.0ms)[0m [1m[34mSELECT "composite_name_entities".* FROM "composite_name_entities" WHERE "composite_name_entities"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
354
|
+
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
355
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
356
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
357
|
+
---------------------------------------------------------------------------------------------
|
358
|
+
CompositeNameEntityProtectedControllerTest: test_responds_with_unauthorized_to_invalid_entity
|
359
|
+
---------------------------------------------------------------------------------------------
|
360
|
+
Processing by CompositeNameEntityProtectedController#index as HTML
|
361
|
+
[1m[36mCompositeNameEntity Load (0.1ms)[0m [1m[34mSELECT "composite_name_entities".* FROM "composite_name_entities" WHERE "composite_name_entities"."id" = ? LIMIT ?[0m [["id", 0], ["LIMIT", 1]]
|
362
|
+
Filter chain halted as :authenticate_composite_name_entity rendered or redirected
|
363
|
+
Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms)
|
364
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
365
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
366
|
+
---------------------------------------------------------------------------------------
|
367
|
+
CompositeNameEntityProtectedControllerTest: test_responds_with_success_if_authenticated
|
368
|
+
---------------------------------------------------------------------------------------
|
369
|
+
[1m[36mCompositeNameEntity Load (0.1ms)[0m [1m[34mSELECT "composite_name_entities".* FROM "composite_name_entities" WHERE "composite_name_entities"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
370
|
+
Processing by CompositeNameEntityProtectedController#index as HTML
|
371
|
+
[1m[36mCompositeNameEntity Load (0.0ms)[0m [1m[34mSELECT "composite_name_entities".* FROM "composite_name_entities" WHERE "composite_name_entities"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
372
|
+
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
373
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
374
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
375
|
+
----------------------------------------------------------------
|
376
|
+
InstallGeneratorTest: test_Assert_all_files_are_properly_created
|
377
|
+
----------------------------------------------------------------
|
378
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
379
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
380
|
+
-------------------------------------------------------------
|
381
|
+
AdminProtectedControllerTest: test_responds_with_unauthorized
|
382
|
+
-------------------------------------------------------------
|
383
|
+
Processing by AdminProtectedController#index as HTML
|
384
|
+
[1m[36mAdmin Load (0.1ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT ?[0m [["id", nil], ["LIMIT", 1]]
|
385
|
+
Filter chain halted as :authenticate_admin rendered or redirected
|
386
|
+
Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms)
|
387
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
388
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
389
|
+
------------------------------------------------------------------------------
|
390
|
+
AdminProtectedControllerTest: test_responds_with_unauthorized_to_invalid_token
|
391
|
+
------------------------------------------------------------------------------
|
392
|
+
Processing by AdminProtectedController#index as HTML
|
393
|
+
Filter chain halted as :authenticate_admin rendered or redirected
|
394
|
+
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
395
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
396
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
397
|
+
---------------------------------------------------------------------------
|
398
|
+
AdminProtectedControllerTest: test_has_a_current_admin_after_authentication
|
399
|
+
---------------------------------------------------------------------------
|
400
|
+
[1m[36mAdmin Load (0.1ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
401
|
+
Processing by AdminProtectedController#index as HTML
|
402
|
+
[1m[36mAdmin Load (0.0ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
403
|
+
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
404
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
405
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
406
|
+
-------------------------------------------------------------------------
|
407
|
+
AdminProtectedControllerTest: test_responds_with_success_if_authenticated
|
408
|
+
-------------------------------------------------------------------------
|
409
|
+
[1m[36mAdmin Load (0.1ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
410
|
+
Processing by AdminProtectedController#index as HTML
|
411
|
+
[1m[36mAdmin Load (0.0ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT ?[0m [["id", 980190962], ["LIMIT", 1]]
|
412
|
+
Completed 200 OK in 1ms (ActiveRecord: 0.0ms)
|
413
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
414
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
415
|
+
-------------------------------------------------------------------------------
|
416
|
+
AdminProtectedControllerTest: test_responds_with_unauthorized_to_invalid_entity
|
417
|
+
-------------------------------------------------------------------------------
|
418
|
+
Processing by AdminProtectedController#index as HTML
|
419
|
+
[1m[36mAdmin Load (0.1ms)[0m [1m[34mSELECT "admins".* FROM "admins" WHERE "admins"."id" = ? LIMIT ?[0m [["id", 0], ["LIMIT", 1]]
|
420
|
+
Filter chain halted as :authenticate_admin rendered or redirected
|
421
|
+
Completed 401 Unauthorized in 1ms (ActiveRecord: 0.1ms)
|
422
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
423
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
424
|
+
---------------------------------------
|
425
|
+
KnockTest: test_setup_block_yields_self
|
426
|
+
---------------------------------------
|
427
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|