simple_token_auth 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +32 -0
  4. data/lib/generators/active_record/simple_token_auth_generator.rb +15 -0
  5. data/lib/generators/simple_token_auth/install_generator.rb +39 -0
  6. data/lib/generators/simple_token_auth/simple_token_auth_generator.rb +15 -0
  7. data/lib/generators/templates/api_key.rb +30 -0
  8. data/lib/generators/templates/migration.rb +12 -0
  9. data/lib/generators/templates/simple_token_auth.rb +14 -0
  10. data/lib/simple_token_auth.rb +28 -0
  11. data/lib/simple_token_auth/authenticate_with_token.rb +54 -0
  12. data/lib/simple_token_auth/configuration.rb +29 -0
  13. data/lib/simple_token_auth/helpers.rb +20 -0
  14. data/lib/simple_token_auth/token_authenticatable.rb +31 -0
  15. data/lib/simple_token_auth/version.rb +3 -0
  16. data/lib/tasks/simple_token_auth_tasks.rake +4 -0
  17. data/test/dummy/README.rdoc +28 -0
  18. data/test/dummy/Rakefile +6 -0
  19. data/test/dummy/app/assets/javascripts/application.js +13 -0
  20. data/test/dummy/app/assets/javascripts/users.js +2 -0
  21. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  22. data/test/dummy/app/assets/stylesheets/users.css +4 -0
  23. data/test/dummy/app/controllers/application_controller.rb +9 -0
  24. data/test/dummy/app/controllers/users_controller.rb +9 -0
  25. data/test/dummy/app/helpers/application_helper.rb +2 -0
  26. data/test/dummy/app/models/api_key.rb +26 -0
  27. data/test/dummy/app/models/user.rb +3 -0
  28. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  29. data/test/dummy/bin/bundle +3 -0
  30. data/test/dummy/bin/rails +4 -0
  31. data/test/dummy/bin/rake +4 -0
  32. data/test/dummy/config.ru +4 -0
  33. data/test/dummy/config/application.rb +23 -0
  34. data/test/dummy/config/boot.rb +5 -0
  35. data/test/dummy/config/database.yml +25 -0
  36. data/test/dummy/config/environment.rb +5 -0
  37. data/test/dummy/config/environments/development.rb +37 -0
  38. data/test/dummy/config/environments/production.rb +78 -0
  39. data/test/dummy/config/environments/test.rb +39 -0
  40. data/test/dummy/config/initializers/assets.rb +8 -0
  41. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  42. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  43. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  44. data/test/dummy/config/initializers/inflections.rb +16 -0
  45. data/test/dummy/config/initializers/mime_types.rb +4 -0
  46. data/test/dummy/config/initializers/session_store.rb +3 -0
  47. data/test/dummy/config/initializers/simple_token_auth.rb +14 -0
  48. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  49. data/test/dummy/config/locales/en.yml +23 -0
  50. data/test/dummy/config/routes.rb +3 -0
  51. data/test/dummy/config/secrets.yml +22 -0
  52. data/test/dummy/db/development.sqlite3 +0 -0
  53. data/test/dummy/db/migrate/20141015200820_create_users.rb +8 -0
  54. data/test/dummy/db/migrate/20141203034209_simple_token_auth_migration.rb +12 -0
  55. data/test/dummy/db/schema.rb +31 -0
  56. data/test/dummy/db/test.sqlite3 +0 -0
  57. data/test/dummy/log/development.log +24 -0
  58. data/test/dummy/log/test.log +2946 -0
  59. data/test/dummy/public/404.html +67 -0
  60. data/test/dummy/public/422.html +67 -0
  61. data/test/dummy/public/500.html +66 -0
  62. data/test/dummy/public/favicon.ico +0 -0
  63. data/test/simple_token_auth/integration_test.rb +38 -0
  64. data/test/simple_token_auth/user_test.rb +18 -0
  65. data/test/simple_token_auth_test.rb +6 -0
  66. data/test/test_helper.rb +17 -0
  67. metadata +204 -0
@@ -0,0 +1,3 @@
1
+ Rails.application.routes.draw do
2
+ resources :users
3
+ end
@@ -0,0 +1,22 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rake secret` to generate a secure secret key.
9
+
10
+ # Make sure the secrets in this file are kept private
11
+ # if you're sharing your code publicly.
12
+
13
+ development:
14
+ secret_key_base: da9c68843cfcc6916bb861289b0f09cf711eb30962c6548b64842b9fced1698acd63cfbf4488ac952e7f9abc530cdc95926de85f1a7ac03efd931eb80a3078f5
15
+
16
+ test:
17
+ secret_key_base: 47754b20b7d9c2c7d16f15aea53493dda0dcb756e979048c2104afc2e79e03301ba203136b42498520ebcdd1222ce5b810a49231c3e75c7e44fae936a33e17e8
18
+
19
+ # Do not keep production secrets in the repository,
20
+ # instead read values from the environment.
21
+ production:
22
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
Binary file
@@ -0,0 +1,8 @@
1
+ class CreateUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table :users do |t|
4
+
5
+ t.timestamps
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,12 @@
1
+ class SimpleTokenAuthMigration < ActiveRecord::Migration
2
+ def change
3
+ create_table :api_keys do |t|
4
+ t.integer :token_authenticatable_id, null: false
5
+ t.string :token_authenticatable_type, null: false
6
+ t.string :access_token, null: false
7
+ t.datetime :expired_at
8
+ t.datetime :created_at
9
+ end
10
+ add_index :api_keys, :access_token, unique: true
11
+ end
12
+ end
@@ -0,0 +1,31 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended that you check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(version: 20141203034209) do
15
+
16
+ create_table "api_keys", force: true do |t|
17
+ t.integer "token_authenticatable_id", null: false
18
+ t.string "token_authenticatable_type", null: false
19
+ t.string "access_token", null: false
20
+ t.datetime "expired_at"
21
+ t.datetime "created_at"
22
+ end
23
+
24
+ add_index "api_keys", ["access_token"], name: "index_api_keys_on_access_token", unique: true
25
+
26
+ create_table "users", force: true do |t|
27
+ t.datetime "created_at"
28
+ t.datetime "updated_at"
29
+ end
30
+
31
+ end
Binary file
@@ -0,0 +1,24 @@
1
+  (1.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
2
+  (0.1ms) select sqlite_version(*)
3
+  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
+ Migrating to CreateUsers (20141015200820)
6
+  (0.2ms) begin transaction
7
+  (0.6ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)
8
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141015200820"]]
9
+  (1.3ms) commit transaction
10
+ Migrating to SimpleTokenAuthorizationAddAuthenticationTokenToUsers (20141015201105)
11
+  (0.2ms) begin transaction
12
+  (0.9ms) ALTER TABLE "users" ADD "authentication_token" varchar(255)
13
+  (2.5ms) CREATE UNIQUE INDEX "index_users_on_authentication_token" ON "users" ("authentication_token")
14
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141015201105"]]
15
+  (1.3ms) commit transaction
16
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
17
+  (0.2ms)  SELECT sql
18
+ FROM sqlite_master
19
+ WHERE name='index_users_on_authentication_token' AND type='index'
20
+ UNION ALL
21
+ SELECT sql
22
+ FROM sqlite_temp_master
23
+ WHERE name='index_users_on_authentication_token' AND type='index'
24
+ 
@@ -0,0 +1,2946 @@
1
+  (0.1ms) begin transaction
2
+ ------------------------------------------------------------------------
3
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
4
+ ------------------------------------------------------------------------
5
+  (0.0ms) rollback transaction
6
+  (1.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
7
+  (18.8ms) select sqlite_version(*)
8
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
9
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
10
+ Migrating to CreateUsers (20141015200820)
11
+  (0.1ms) begin transaction
12
+  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)
13
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141015200820"]]
14
+  (1.2ms) commit transaction
15
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
16
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
17
+ Migrating to SimpleTokenAuthorizationAddAuthenticationTokenToUsers (20141015201105)
18
+  (0.1ms) begin transaction
19
+  (0.5ms) ALTER TABLE "users" ADD "authentication_token" varchar(255)
20
+  (0.1ms) select sqlite_version(*)
21
+  (0.9ms) CREATE UNIQUE INDEX "index_users_on_authentication_token" ON "users" ("authentication_token")
22
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141015201105"]]
23
+  (1.0ms) commit transaction
24
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
25
+  (0.1ms)  SELECT sql
26
+ FROM sqlite_master
27
+ WHERE name='index_users_on_authentication_token' AND type='index'
28
+ UNION ALL
29
+ SELECT sql
30
+ FROM sqlite_temp_master
31
+ WHERE name='index_users_on_authentication_token' AND type='index'
32
+ 
33
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
34
+  (0.1ms) begin transaction
35
+ ------------------------------------------------------------------------
36
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
37
+ ------------------------------------------------------------------------
38
+  (0.0ms) rollback transaction
39
+  (0.1ms) begin transaction
40
+ ---------------------------------------------------------
41
+ UsersControllerTest: test_returns_401_when_not_authorized
42
+ ---------------------------------------------------------
43
+  (0.1ms) rollback transaction
44
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
45
+  (0.1ms) begin transaction
46
+ ---------------------------------------------------------
47
+ UsersControllerTest: test_returns_401_when_not_authorized
48
+ ---------------------------------------------------------
49
+  (0.1ms) rollback transaction
50
+  (0.1ms) begin transaction
51
+ ------------------------------------------------------------------------
52
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
53
+ ------------------------------------------------------------------------
54
+  (0.0ms) rollback transaction
55
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
56
+  (0.1ms) begin transaction
57
+ ------------------------------------------------------------------------
58
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
59
+ ------------------------------------------------------------------------
60
+  (0.0ms) rollback transaction
61
+  (0.1ms) begin transaction
62
+ ---------------------------------------------------------
63
+ UsersControllerTest: test_returns_401_when_not_authorized
64
+ ---------------------------------------------------------
65
+  (0.1ms) rollback transaction
66
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
67
+  (0.1ms) begin transaction
68
+ ------------------------------------------------------------------------
69
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
70
+ ------------------------------------------------------------------------
71
+  (0.0ms) rollback transaction
72
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
73
+  (0.1ms) begin transaction
74
+ ---------------------------------------------------------
75
+ UsersControllerTest: test_returns_401_when_not_authorized
76
+ ---------------------------------------------------------
77
+  (0.1ms) rollback transaction
78
+  (0.0ms) begin transaction
79
+ ------------------------------------------------------------------------
80
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
81
+ ------------------------------------------------------------------------
82
+  (0.0ms) rollback transaction
83
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
84
+  (0.1ms) begin transaction
85
+ ------------------------------------------------------------------------
86
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
87
+ ------------------------------------------------------------------------
88
+  (0.0ms) rollback transaction
89
+  (0.0ms) begin transaction
90
+ ---------------------------------------------------------
91
+ UsersControllerTest: test_returns_401_when_not_authorized
92
+ ---------------------------------------------------------
93
+  (0.1ms) rollback transaction
94
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
95
+  (0.1ms) begin transaction
96
+ ------------------------------------------------------------------------
97
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
98
+ ------------------------------------------------------------------------
99
+  (0.0ms) rollback transaction
100
+  (0.0ms) begin transaction
101
+ ---------------------------------------------------------
102
+ UsersControllerTest: test_returns_401_when_not_authorized
103
+ ---------------------------------------------------------
104
+  (0.1ms) rollback transaction
105
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
106
+  (0.1ms) begin transaction
107
+ ------------------------------------------------------------------------
108
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
109
+ ------------------------------------------------------------------------
110
+  (0.1ms) rollback transaction
111
+  (0.1ms) begin transaction
112
+ ---------------------------------------------------------
113
+ UsersControllerTest: test_returns_401_when_not_authorized
114
+ ---------------------------------------------------------
115
+  (0.1ms) rollback transaction
116
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
117
+  (0.1ms) begin transaction
118
+ ------------------------------------------------------------------------
119
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
120
+ ------------------------------------------------------------------------
121
+  (0.0ms) rollback transaction
122
+  (0.0ms) begin transaction
123
+ ---------------------------------------------------------
124
+ UsersControllerTest: test_returns_401_when_not_authorized
125
+ ---------------------------------------------------------
126
+  (0.1ms) rollback transaction
127
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
128
+  (0.1ms) begin transaction
129
+ ---------------------------------------------------------
130
+ UsersControllerTest: test_returns_401_when_not_authorized
131
+ ---------------------------------------------------------
132
+  (0.1ms) rollback transaction
133
+  (0.0ms) begin transaction
134
+ ------------------------------------------------------------------------
135
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
136
+ ------------------------------------------------------------------------
137
+  (0.0ms) rollback transaction
138
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
139
+  (0.1ms) begin transaction
140
+ ------------------------------------------------------------------------
141
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
142
+ ------------------------------------------------------------------------
143
+  (0.0ms) rollback transaction
144
+  (0.0ms) begin transaction
145
+ ---------------------------------------------------------
146
+ UsersControllerTest: test_returns_401_when_not_authorized
147
+ ---------------------------------------------------------
148
+  (0.1ms) rollback transaction
149
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
150
+  (0.1ms) begin transaction
151
+ ---------------------------------------------------------
152
+ UsersControllerTest: test_returns_401_when_not_authorized
153
+ ---------------------------------------------------------
154
+  (0.1ms) rollback transaction
155
+  (0.0ms) begin transaction
156
+ ------------------------------------------------------------------------
157
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
158
+ ------------------------------------------------------------------------
159
+  (0.0ms) rollback transaction
160
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
161
+  (0.1ms) begin transaction
162
+ ------------------------------------------------------------------------
163
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
164
+ ------------------------------------------------------------------------
165
+  (0.0ms) rollback transaction
166
+  (0.0ms) begin transaction
167
+ ---------------------------------------------------------
168
+ UsersControllerTest: test_returns_401_when_not_authorized
169
+ ---------------------------------------------------------
170
+  (0.1ms) rollback transaction
171
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
172
+  (0.1ms) begin transaction
173
+ ---------------------------------------------------------
174
+ UsersControllerTest: test_returns_401_when_not_authorized
175
+ ---------------------------------------------------------
176
+  (0.1ms) rollback transaction
177
+  (0.0ms) begin transaction
178
+ ------------------------------------------------------------------------
179
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
180
+ ------------------------------------------------------------------------
181
+  (0.0ms) rollback transaction
182
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
183
+  (0.1ms) begin transaction
184
+ ------------------------------------------------------------------------
185
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
186
+ ------------------------------------------------------------------------
187
+  (0.0ms) rollback transaction
188
+  (0.0ms) begin transaction
189
+ ---------------------------------------------------------
190
+ UsersControllerTest: test_returns_401_when_not_authorized
191
+ ---------------------------------------------------------
192
+  (0.1ms) rollback transaction
193
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
194
+  (0.1ms) begin transaction
195
+ ------------------------------------------------------------------------
196
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
197
+ ------------------------------------------------------------------------
198
+  (0.0ms) rollback transaction
199
+  (0.0ms) begin transaction
200
+ ---------------------------------------------------------
201
+ UsersControllerTest: test_returns_401_when_not_authorized
202
+ ---------------------------------------------------------
203
+ Processing by UsersController#index as JSON
204
+ Rendered text template (0.0ms)
205
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
206
+ Completed 401 Unauthorized in 99ms (Views: 98.3ms | ActiveRecord: 0.0ms)
207
+  (0.1ms) rollback transaction
208
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
209
+  (0.1ms) begin transaction
210
+ ---------------------------------------------------------
211
+ UsersControllerTest: test_returns_401_when_not_authorized
212
+ ---------------------------------------------------------
213
+ Processing by UsersController#index as JSON
214
+ Rendered text template (0.0ms)
215
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
216
+ Completed 401 Unauthorized in 33ms (Views: 32.3ms | ActiveRecord: 0.0ms)
217
+  (0.1ms) rollback transaction
218
+  (0.0ms) begin transaction
219
+ ---------------------------------------------------------
220
+ UsersControllerTest: test_returns_success_when_authorized
221
+ ---------------------------------------------------------
222
+  (0.0ms) SAVEPOINT active_record_1
223
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
224
+  (0.0ms) rollback transaction
225
+  (0.0ms) begin transaction
226
+ ------------------------------------------------------------------------
227
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
228
+ ------------------------------------------------------------------------
229
+  (0.0ms) rollback transaction
230
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
231
+  (0.1ms) begin transaction
232
+ ---------------------------------------------------------
233
+ UsersControllerTest: test_returns_401_when_not_authorized
234
+ ---------------------------------------------------------
235
+ Processing by UsersController#index as JSON
236
+ Rendered text template (0.0ms)
237
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
238
+ Completed 401 Unauthorized in 36ms (Views: 35.4ms | ActiveRecord: 0.0ms)
239
+  (0.1ms) rollback transaction
240
+  (0.0ms) begin transaction
241
+ ---------------------------------------------------------
242
+ UsersControllerTest: test_returns_success_when_authorized
243
+ ---------------------------------------------------------
244
+  (0.0ms) SAVEPOINT active_record_1
245
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
246
+  (0.0ms) rollback transaction
247
+  (0.0ms) begin transaction
248
+ ------------------------------------------------------------------------
249
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
250
+ ------------------------------------------------------------------------
251
+  (0.0ms) rollback transaction
252
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
253
+  (0.1ms) begin transaction
254
+ ------------------------------------------------------------------------
255
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
256
+ ------------------------------------------------------------------------
257
+  (0.1ms) rollback transaction
258
+  (0.0ms) begin transaction
259
+ ---------------------------------------------------------
260
+ UsersControllerTest: test_returns_401_when_not_authorized
261
+ ---------------------------------------------------------
262
+ Processing by UsersController#index as JSON
263
+ Rendered text template (0.0ms)
264
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
265
+ Completed 401 Unauthorized in 36ms (Views: 34.9ms | ActiveRecord: 0.0ms)
266
+  (0.1ms) rollback transaction
267
+  (0.0ms) begin transaction
268
+ ---------------------------------------------------------
269
+ UsersControllerTest: test_returns_success_when_authorized
270
+ ---------------------------------------------------------
271
+  (0.0ms) SAVEPOINT active_record_1
272
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
273
+  (0.0ms) rollback transaction
274
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
275
+  (0.1ms) begin transaction
276
+ ------------------------------------------------------------------------
277
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
278
+ ------------------------------------------------------------------------
279
+  (0.0ms) rollback transaction
280
+  (0.0ms) begin transaction
281
+ ---------------------------------------------------------
282
+ UsersControllerTest: test_returns_401_when_not_authorized
283
+ ---------------------------------------------------------
284
+ Processing by UsersController#index as JSON
285
+ Rendered text template (0.0ms)
286
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
287
+ Completed 401 Unauthorized in 35ms (Views: 34.4ms | ActiveRecord: 0.0ms)
288
+  (0.1ms) rollback transaction
289
+  (0.0ms) begin transaction
290
+ ---------------------------------------------------------
291
+ UsersControllerTest: test_returns_success_when_authorized
292
+ ---------------------------------------------------------
293
+  (0.1ms) SAVEPOINT active_record_1
294
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
295
+  (0.0ms) rollback transaction
296
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
297
+  (0.1ms) begin transaction
298
+ ---------------------------------------------------------
299
+ UsersControllerTest: test_returns_401_when_not_authorized
300
+ ---------------------------------------------------------
301
+ Processing by UsersController#index as JSON
302
+ Rendered text template (0.0ms)
303
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
304
+ Completed 401 Unauthorized in 36ms (Views: 35.0ms | ActiveRecord: 0.0ms)
305
+  (0.1ms) rollback transaction
306
+  (0.0ms) begin transaction
307
+ ---------------------------------------------------------
308
+ UsersControllerTest: test_returns_success_when_authorized
309
+ ---------------------------------------------------------
310
+  (0.0ms) SAVEPOINT active_record_1
311
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
312
+  (0.0ms) rollback transaction
313
+  (0.0ms) begin transaction
314
+ ------------------------------------------------------------------------
315
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
316
+ ------------------------------------------------------------------------
317
+  (0.0ms) rollback transaction
318
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
319
+  (0.1ms) begin transaction
320
+ ---------------------------------------------------------
321
+ UsersControllerTest: test_returns_401_when_not_authorized
322
+ ---------------------------------------------------------
323
+ Processing by UsersController#index as JSON
324
+ Rendered text template (0.0ms)
325
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
326
+ Completed 401 Unauthorized in 35ms (Views: 34.4ms | ActiveRecord: 0.0ms)
327
+  (0.1ms) rollback transaction
328
+  (0.0ms) begin transaction
329
+ ---------------------------------------------------------
330
+ UsersControllerTest: test_returns_success_when_authorized
331
+ ---------------------------------------------------------
332
+  (0.0ms) SAVEPOINT active_record_1
333
+ User Exists (13.4ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 't4de1Jo2gn4Gxs_HgCG-' LIMIT 1
334
+ SQL (1.3ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "t4de1Jo2gn4Gxs_HgCG-"], ["created_at", "2014-10-15 21:31:59.560352"], ["updated_at", "2014-10-15 21:31:59.560352"]]
335
+  (0.1ms) RELEASE SAVEPOINT active_record_1
336
+ Processing by UsersController#index as HTML
337
+ Completed 500 Internal Server Error in 0ms
338
+  (0.5ms) rollback transaction
339
+  (0.1ms) begin transaction
340
+ ------------------------------------------------------------------------
341
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
342
+ ------------------------------------------------------------------------
343
+  (0.0ms) rollback transaction
344
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
345
+  (0.1ms) begin transaction
346
+ ---------------------------------------------------------
347
+ UsersControllerTest: test_returns_401_when_not_authorized
348
+ ---------------------------------------------------------
349
+ Processing by UsersController#index as JSON
350
+ Rendered text template (0.0ms)
351
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
352
+ Completed 401 Unauthorized in 35ms (Views: 34.3ms | ActiveRecord: 0.0ms)
353
+  (0.1ms) rollback transaction
354
+  (0.0ms) begin transaction
355
+ ---------------------------------------------------------
356
+ UsersControllerTest: test_returns_success_when_authorized
357
+ ---------------------------------------------------------
358
+  (0.0ms) SAVEPOINT active_record_1
359
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'ADcRqWzzPCvj-EJ-Kfyz' LIMIT 1
360
+ SQL (0.4ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "ADcRqWzzPCvj-EJ-Kfyz"], ["created_at", "2014-10-15 21:33:08.974861"], ["updated_at", "2014-10-15 21:33:08.974861"]]
361
+  (0.0ms) RELEASE SAVEPOINT active_record_1
362
+ Processing by UsersController#index as HTML
363
+ Completed 500 Internal Server Error in 0ms
364
+  (0.4ms) rollback transaction
365
+  (0.0ms) begin transaction
366
+ ------------------------------------------------------------------------
367
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
368
+ ------------------------------------------------------------------------
369
+  (0.0ms) rollback transaction
370
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
371
+  (0.1ms) begin transaction
372
+ ------------------------------------------------------------------------
373
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
374
+ ------------------------------------------------------------------------
375
+  (0.0ms) rollback transaction
376
+  (0.0ms) begin transaction
377
+ ---------------------------------------------------------
378
+ UsersControllerTest: test_returns_401_when_not_authorized
379
+ ---------------------------------------------------------
380
+ Processing by UsersController#index as JSON
381
+ Rendered text template (0.0ms)
382
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
383
+ Completed 401 Unauthorized in 37ms (Views: 36.7ms | ActiveRecord: 0.0ms)
384
+  (0.1ms) rollback transaction
385
+  (0.0ms) begin transaction
386
+ ---------------------------------------------------------
387
+ UsersControllerTest: test_returns_success_when_authorized
388
+ ---------------------------------------------------------
389
+  (0.1ms) SAVEPOINT active_record_1
390
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'HzdKhNftETQekPk1CRnD' LIMIT 1
391
+ SQL (0.3ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "HzdKhNftETQekPk1CRnD"], ["created_at", "2014-10-15 21:33:47.836489"], ["updated_at", "2014-10-15 21:33:47.836489"]]
392
+  (0.0ms) RELEASE SAVEPOINT active_record_1
393
+ Processing by UsersController#index as HTML
394
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
395
+ Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
396
+  (0.4ms) rollback transaction
397
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
398
+  (0.1ms) begin transaction
399
+ ------------------------------------------------------------------------
400
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
401
+ ------------------------------------------------------------------------
402
+  (0.0ms) rollback transaction
403
+  (0.0ms) begin transaction
404
+ ---------------------------------------------------------
405
+ UsersControllerTest: test_returns_401_when_not_authorized
406
+ ---------------------------------------------------------
407
+ Processing by UsersController#index as JSON
408
+ Rendered text template (0.0ms)
409
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
410
+ Completed 401 Unauthorized in 34ms (Views: 33.4ms | ActiveRecord: 0.0ms)
411
+  (0.1ms) rollback transaction
412
+  (0.0ms) begin transaction
413
+ ---------------------------------------------------------
414
+ UsersControllerTest: test_returns_success_when_authorized
415
+ ---------------------------------------------------------
416
+  (0.0ms) SAVEPOINT active_record_1
417
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'keuCQ9XZhVog_iwvpTw6' LIMIT 1
418
+ SQL (0.3ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "keuCQ9XZhVog_iwvpTw6"], ["created_at", "2014-10-15 21:35:06.671592"], ["updated_at", "2014-10-15 21:35:06.671592"]]
419
+  (0.1ms) RELEASE SAVEPOINT active_record_1
420
+ Processing by UsersController#index as HTML
421
+ Completed 500 Internal Server Error in 0ms
422
+  (0.6ms) rollback transaction
423
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
424
+  (0.1ms) begin transaction
425
+ ---------------------------------------------------------
426
+ UsersControllerTest: test_returns_401_when_not_authorized
427
+ ---------------------------------------------------------
428
+ Processing by UsersController#index as JSON
429
+ Rendered text template (0.0ms)
430
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
431
+ Completed 401 Unauthorized in 34ms (Views: 33.4ms | ActiveRecord: 0.0ms)
432
+  (0.1ms) rollback transaction
433
+  (0.0ms) begin transaction
434
+ ---------------------------------------------------------
435
+ UsersControllerTest: test_returns_success_when_authorized
436
+ ---------------------------------------------------------
437
+  (0.0ms) SAVEPOINT active_record_1
438
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'jv5xUK6sSxj4-T7GCEVc' LIMIT 1
439
+ SQL (0.3ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "jv5xUK6sSxj4-T7GCEVc"], ["created_at", "2014-10-15 21:36:44.498541"], ["updated_at", "2014-10-15 21:36:44.498541"]]
440
+  (0.1ms) RELEASE SAVEPOINT active_record_1
441
+ Processing by UsersController#index as HTML
442
+ Completed 500 Internal Server Error in 0ms
443
+  (0.5ms) rollback transaction
444
+  (0.1ms) begin transaction
445
+ ------------------------------------------------------------------------
446
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
447
+ ------------------------------------------------------------------------
448
+  (0.0ms) rollback transaction
449
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
450
+  (0.1ms) begin transaction
451
+ ------------------------------------------------------------------------
452
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
453
+ ------------------------------------------------------------------------
454
+  (0.0ms) rollback transaction
455
+  (0.0ms) begin transaction
456
+ ---------------------------------------------------------
457
+ UsersControllerTest: test_returns_401_when_not_authorized
458
+ ---------------------------------------------------------
459
+ Processing by UsersController#index as JSON
460
+ Rendered text template (0.0ms)
461
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
462
+ Completed 401 Unauthorized in 39ms (Views: 38.6ms | ActiveRecord: 0.0ms)
463
+  (0.1ms) rollback transaction
464
+  (0.1ms) begin transaction
465
+ ---------------------------------------------------------
466
+ UsersControllerTest: test_returns_success_when_authorized
467
+ ---------------------------------------------------------
468
+  (0.0ms) SAVEPOINT active_record_1
469
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'myUvDH8Y4_JjcHwTUWNz' LIMIT 1
470
+ SQL (0.4ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "myUvDH8Y4_JjcHwTUWNz"], ["created_at", "2014-10-15 21:37:08.529931"], ["updated_at", "2014-10-15 21:37:08.529931"]]
471
+  (0.0ms) RELEASE SAVEPOINT active_record_1
472
+ Processing by UsersController#index as HTML
473
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
474
+ Completed 500 Internal Server Error in 1ms
475
+  (0.6ms) rollback transaction
476
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
477
+  (0.1ms) begin transaction
478
+ ---------------------------------------------------------
479
+ UsersControllerTest: test_returns_401_when_not_authorized
480
+ ---------------------------------------------------------
481
+ Processing by UsersController#index as JSON
482
+ Rendered text template (0.0ms)
483
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
484
+ Completed 401 Unauthorized in 38ms (Views: 36.7ms | ActiveRecord: 0.0ms)
485
+  (0.1ms) rollback transaction
486
+  (0.0ms) begin transaction
487
+ ---------------------------------------------------------
488
+ UsersControllerTest: test_returns_success_when_authorized
489
+ ---------------------------------------------------------
490
+  (0.0ms) SAVEPOINT active_record_1
491
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'fs8yS1_you3mD9njXPPL' LIMIT 1
492
+ SQL (0.3ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "fs8yS1_you3mD9njXPPL"], ["created_at", "2014-10-15 21:37:45.107094"], ["updated_at", "2014-10-15 21:37:45.107094"]]
493
+  (0.0ms) RELEASE SAVEPOINT active_record_1
494
+ Processing by UsersController#index as HTML
495
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
496
+ Completed 500 Internal Server Error in 1ms
497
+  (0.6ms) rollback transaction
498
+  (0.0ms) begin transaction
499
+ ------------------------------------------------------------------------
500
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
501
+ ------------------------------------------------------------------------
502
+  (0.0ms) rollback transaction
503
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
504
+  (0.1ms) begin transaction
505
+ ------------------------------------------------------------------------
506
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
507
+ ------------------------------------------------------------------------
508
+  (0.0ms) rollback transaction
509
+  (0.0ms) begin transaction
510
+ ---------------------------------------------------------
511
+ UsersControllerTest: test_returns_401_when_not_authorized
512
+ ---------------------------------------------------------
513
+ Processing by UsersController#index as JSON
514
+ Rendered text template (0.0ms)
515
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
516
+ Completed 401 Unauthorized in 34ms (Views: 32.9ms | ActiveRecord: 0.0ms)
517
+  (0.1ms) rollback transaction
518
+  (0.1ms) begin transaction
519
+ ---------------------------------------------------------
520
+ UsersControllerTest: test_returns_success_when_authorized
521
+ ---------------------------------------------------------
522
+  (0.0ms) SAVEPOINT active_record_1
523
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'usfoLoH38kxqwfguhHN8' LIMIT 1
524
+ SQL (0.3ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "usfoLoH38kxqwfguhHN8"], ["created_at", "2014-10-15 21:38:37.980519"], ["updated_at", "2014-10-15 21:38:37.980519"]]
525
+  (0.0ms) RELEASE SAVEPOINT active_record_1
526
+ Processing by UsersController#index as HTML
527
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
528
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
529
+ Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)
530
+  (0.5ms) rollback transaction
531
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
532
+  (0.1ms) begin transaction
533
+ ---------------------------------------------------------
534
+ UsersControllerTest: test_returns_401_when_not_authorized
535
+ ---------------------------------------------------------
536
+ Processing by UsersController#index as JSON
537
+ Rendered text template (0.0ms)
538
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
539
+ Completed 401 Unauthorized in 37ms (Views: 36.5ms | ActiveRecord: 0.0ms)
540
+  (0.1ms) rollback transaction
541
+  (0.0ms) begin transaction
542
+ ---------------------------------------------------------
543
+ UsersControllerTest: test_returns_success_when_authorized
544
+ ---------------------------------------------------------
545
+  (0.0ms) SAVEPOINT active_record_1
546
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'g4aJoyTWysNAdPynorKx' LIMIT 1
547
+ SQL (0.4ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "g4aJoyTWysNAdPynorKx"], ["created_at", "2014-10-15 21:39:28.720543"], ["updated_at", "2014-10-15 21:39:28.720543"]]
548
+  (0.0ms) RELEASE SAVEPOINT active_record_1
549
+ Processing by UsersController#index as HTML
550
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
551
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
552
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
553
+  (0.4ms) rollback transaction
554
+  (0.0ms) begin transaction
555
+ ------------------------------------------------------------------------
556
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
557
+ ------------------------------------------------------------------------
558
+  (0.0ms) rollback transaction
559
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
560
+  (0.1ms) begin transaction
561
+ ---------------------------------------------------------
562
+ UsersControllerTest: test_returns_401_when_not_authorized
563
+ ---------------------------------------------------------
564
+ Processing by UsersController#index as JSON
565
+ Rendered text template (0.0ms)
566
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
567
+ Completed 401 Unauthorized in 36ms (Views: 34.5ms | ActiveRecord: 0.0ms)
568
+  (0.1ms) rollback transaction
569
+  (0.0ms) begin transaction
570
+ ---------------------------------------------------------
571
+ UsersControllerTest: test_returns_success_when_authorized
572
+ ---------------------------------------------------------
573
+  (0.0ms) SAVEPOINT active_record_1
574
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = '7MU7rwKvszhnUuu-zALR' LIMIT 1
575
+ SQL (0.3ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "7MU7rwKvszhnUuu-zALR"], ["created_at", "2014-10-15 21:40:03.006108"], ["updated_at", "2014-10-15 21:40:03.006108"]]
576
+  (0.0ms) RELEASE SAVEPOINT active_record_1
577
+ Processing by UsersController#index as HTML
578
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
579
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
580
+ Completed 401 Unauthorized in 40ms (Views: 0.5ms | ActiveRecord: 0.2ms)
581
+  (0.6ms) rollback transaction
582
+  (0.1ms) begin transaction
583
+ ------------------------------------------------------------------------
584
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
585
+ ------------------------------------------------------------------------
586
+  (0.1ms) rollback transaction
587
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
588
+  (0.1ms) begin transaction
589
+ ------------------------------------------------------------------------
590
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
591
+ ------------------------------------------------------------------------
592
+  (0.0ms) rollback transaction
593
+  (0.0ms) begin transaction
594
+ ---------------------------------------------------------
595
+ UsersControllerTest: test_returns_401_when_not_authorized
596
+ ---------------------------------------------------------
597
+ Processing by UsersController#index as JSON
598
+ Rendered text template (0.0ms)
599
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
600
+ Completed 401 Unauthorized in 41ms (Views: 39.7ms | ActiveRecord: 0.0ms)
601
+  (0.1ms) rollback transaction
602
+  (0.0ms) begin transaction
603
+ ---------------------------------------------------------
604
+ UsersControllerTest: test_returns_success_when_authorized
605
+ ---------------------------------------------------------
606
+  (0.0ms) SAVEPOINT active_record_1
607
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = '3z5c93zy2dZqTMoJNeFE' LIMIT 1
608
+ SQL (0.3ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "3z5c93zy2dZqTMoJNeFE"], ["created_at", "2014-10-15 21:40:20.962263"], ["updated_at", "2014-10-15 21:40:20.962263"]]
609
+  (0.0ms) RELEASE SAVEPOINT active_record_1
610
+ Processing by UsersController#index as HTML
611
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
612
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
613
+ Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)
614
+  (0.5ms) rollback transaction
615
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
616
+  (0.1ms) begin transaction
617
+ ------------------------------------------------------------------------
618
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
619
+ ------------------------------------------------------------------------
620
+  (0.0ms) rollback transaction
621
+  (0.0ms) begin transaction
622
+ ---------------------------------------------------------
623
+ UsersControllerTest: test_returns_401_when_not_authorized
624
+ ---------------------------------------------------------
625
+ Processing by UsersController#index as JSON
626
+ Rendered text template (0.0ms)
627
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
628
+ Completed 401 Unauthorized in 38ms (Views: 37.1ms | ActiveRecord: 0.0ms)
629
+  (0.1ms) rollback transaction
630
+  (0.0ms) begin transaction
631
+ ---------------------------------------------------------
632
+ UsersControllerTest: test_returns_success_when_authorized
633
+ ---------------------------------------------------------
634
+  (0.0ms) SAVEPOINT active_record_1
635
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'gWKRhmN6UEszRjy92Ats' LIMIT 1
636
+ SQL (0.3ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "gWKRhmN6UEszRjy92Ats"], ["created_at", "2014-10-15 21:40:49.752480"], ["updated_at", "2014-10-15 21:40:49.752480"]]
637
+  (0.0ms) RELEASE SAVEPOINT active_record_1
638
+ Processing by UsersController#index as HTML
639
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
640
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
641
+ Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)
642
+  (0.6ms) rollback transaction
643
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
644
+  (0.1ms) begin transaction
645
+ ---------------------------------------------------------
646
+ UsersControllerTest: test_returns_401_when_not_authorized
647
+ ---------------------------------------------------------
648
+ Processing by UsersController#index as JSON
649
+ Rendered text template (0.0ms)
650
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
651
+ Completed 401 Unauthorized in 36ms (Views: 34.9ms | ActiveRecord: 0.0ms)
652
+  (0.1ms) rollback transaction
653
+  (0.0ms) begin transaction
654
+ ---------------------------------------------------------
655
+ UsersControllerTest: test_returns_success_when_authorized
656
+ ---------------------------------------------------------
657
+  (0.0ms) SAVEPOINT active_record_1
658
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = '8r6Vn5H8pcofCCRzEF9G' LIMIT 1
659
+ SQL (0.3ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "8r6Vn5H8pcofCCRzEF9G"], ["created_at", "2014-10-15 21:41:06.740160"], ["updated_at", "2014-10-15 21:41:06.740160"]]
660
+  (0.0ms) RELEASE SAVEPOINT active_record_1
661
+ Processing by UsersController#index as HTML
662
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
663
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
664
+ Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)
665
+  (0.5ms) rollback transaction
666
+  (0.0ms) begin transaction
667
+ ------------------------------------------------------------------------
668
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
669
+ ------------------------------------------------------------------------
670
+  (0.0ms) rollback transaction
671
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
672
+  (0.1ms) begin transaction
673
+ ---------------------------------------------------------
674
+ UsersControllerTest: test_returns_401_when_not_authorized
675
+ ---------------------------------------------------------
676
+ Processing by UsersController#index as JSON
677
+ Rendered text template (0.0ms)
678
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
679
+ Completed 401 Unauthorized in 38ms (Views: 36.8ms | ActiveRecord: 0.0ms)
680
+  (0.1ms) rollback transaction
681
+  (0.0ms) begin transaction
682
+ ---------------------------------------------------------
683
+ UsersControllerTest: test_returns_success_when_authorized
684
+ ---------------------------------------------------------
685
+  (0.0ms) SAVEPOINT active_record_1
686
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'knu-Ty1ynsoVtu-Ldxk9' LIMIT 1
687
+ SQL (0.4ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "knu-Ty1ynsoVtu-Ldxk9"], ["created_at", "2014-10-15 21:41:43.302935"], ["updated_at", "2014-10-15 21:41:43.302935"]]
688
+  (0.1ms) RELEASE SAVEPOINT active_record_1
689
+ Processing by UsersController#index as HTML
690
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
691
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
692
+ Completed 401 Unauthorized in 2ms (Views: 0.3ms | ActiveRecord: 0.1ms)
693
+  (0.5ms) rollback transaction
694
+  (0.0ms) begin transaction
695
+ ------------------------------------------------------------------------
696
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
697
+ ------------------------------------------------------------------------
698
+  (0.0ms) rollback transaction
699
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
700
+  (0.1ms) begin transaction
701
+ ------------------------------------------------------------------------
702
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
703
+ ------------------------------------------------------------------------
704
+  (0.0ms) rollback transaction
705
+  (0.0ms) begin transaction
706
+ ---------------------------------------------------------
707
+ UsersControllerTest: test_returns_401_when_not_authorized
708
+ ---------------------------------------------------------
709
+ Processing by UsersController#index as JSON
710
+ Rendered text template (0.0ms)
711
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
712
+ Completed 401 Unauthorized in 34ms (Views: 33.3ms | ActiveRecord: 0.0ms)
713
+  (0.1ms) rollback transaction
714
+  (0.1ms) begin transaction
715
+ ---------------------------------------------------------
716
+ UsersControllerTest: test_returns_success_when_authorized
717
+ ---------------------------------------------------------
718
+  (0.0ms) SAVEPOINT active_record_1
719
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'XTjyzb1mS4TW5ax4iUDL' LIMIT 1
720
+ SQL (0.4ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "XTjyzb1mS4TW5ax4iUDL"], ["created_at", "2014-10-15 21:42:49.085163"], ["updated_at", "2014-10-15 21:42:49.085163"]]
721
+  (0.0ms) RELEASE SAVEPOINT active_record_1
722
+ Processing by UsersController#index as HTML
723
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
724
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
725
+ Completed 401 Unauthorized in 2ms (Views: 0.3ms | ActiveRecord: 0.1ms)
726
+  (170.6ms) rollback transaction
727
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
728
+  (0.1ms) begin transaction
729
+ ------------------------------------------------------------------------
730
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
731
+ ------------------------------------------------------------------------
732
+  (0.0ms) rollback transaction
733
+  (0.0ms) begin transaction
734
+ ---------------------------------------------------------
735
+ UsersControllerTest: test_returns_401_when_not_authorized
736
+ ---------------------------------------------------------
737
+ Processing by UsersController#index as JSON
738
+ Rendered text template (0.0ms)
739
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
740
+ Completed 401 Unauthorized in 35ms (Views: 34.4ms | ActiveRecord: 0.0ms)
741
+  (0.1ms) rollback transaction
742
+  (0.0ms) begin transaction
743
+ ---------------------------------------------------------
744
+ UsersControllerTest: test_returns_success_when_authorized
745
+ ---------------------------------------------------------
746
+  (0.0ms) SAVEPOINT active_record_1
747
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'Y2p-hh5qsYuG7F7GQBni' LIMIT 1
748
+ SQL (0.9ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "Y2p-hh5qsYuG7F7GQBni"], ["created_at", "2014-10-15 21:44:19.624525"], ["updated_at", "2014-10-15 21:44:19.624525"]]
749
+  (0.0ms) RELEASE SAVEPOINT active_record_1
750
+ Processing by UsersController#index as HTML
751
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
752
+ Completed 500 Internal Server Error in 2ms
753
+  (0.6ms) rollback transaction
754
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
755
+  (0.1ms) begin transaction
756
+ ---------------------------------------------------------
757
+ UsersControllerTest: test_returns_401_when_not_authorized
758
+ ---------------------------------------------------------
759
+ Processing by UsersController#index as JSON
760
+ Rendered text template (0.0ms)
761
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
762
+ Completed 401 Unauthorized in 34ms (Views: 33.2ms | ActiveRecord: 0.0ms)
763
+  (0.1ms) rollback transaction
764
+  (0.0ms) begin transaction
765
+ ---------------------------------------------------------
766
+ UsersControllerTest: test_returns_success_when_authorized
767
+ ---------------------------------------------------------
768
+  (0.0ms) SAVEPOINT active_record_1
769
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'yaQ9MWvxX9BWSk5orbF6' LIMIT 1
770
+ SQL (0.3ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "yaQ9MWvxX9BWSk5orbF6"], ["created_at", "2014-10-15 21:44:51.092705"], ["updated_at", "2014-10-15 21:44:51.092705"]]
771
+  (0.0ms) RELEASE SAVEPOINT active_record_1
772
+ Processing by UsersController#index as HTML
773
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
774
+ User Load (0.1ms) SELECT "users".* FROM "users"
775
+ Completed 200 OK in 38ms (Views: 37.4ms | ActiveRecord: 0.1ms)
776
+  (0.8ms) rollback transaction
777
+  (0.1ms) begin transaction
778
+ ------------------------------------------------------------------------
779
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
780
+ ------------------------------------------------------------------------
781
+  (0.0ms) rollback transaction
782
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
783
+  (0.1ms) begin transaction
784
+ ------------------------------------------------------------------------
785
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
786
+ ------------------------------------------------------------------------
787
+  (0.0ms) rollback transaction
788
+  (0.0ms) begin transaction
789
+ ---------------------------------------------------------
790
+ UsersControllerTest: test_returns_401_when_not_authorized
791
+ ---------------------------------------------------------
792
+ Processing by UsersController#index as JSON
793
+ Rendered text template (0.0ms)
794
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
795
+ Completed 401 Unauthorized in 35ms (Views: 33.8ms | ActiveRecord: 0.0ms)
796
+  (0.1ms) rollback transaction
797
+  (0.0ms) begin transaction
798
+ ---------------------------------------------------------
799
+ UsersControllerTest: test_returns_success_when_authorized
800
+ ---------------------------------------------------------
801
+  (0.0ms) SAVEPOINT active_record_1
802
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'TVzQ7iYFVnEfdwd_GQaW' LIMIT 1
803
+ SQL (0.3ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "TVzQ7iYFVnEfdwd_GQaW"], ["created_at", "2014-10-15 21:45:23.085333"], ["updated_at", "2014-10-15 21:45:23.085333"]]
804
+  (0.0ms) RELEASE SAVEPOINT active_record_1
805
+ Processing by UsersController#index as HTML
806
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
807
+ User Load (0.1ms) SELECT "users".* FROM "users"
808
+ Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)
809
+  (0.7ms) rollback transaction
810
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
811
+  (0.1ms) begin transaction
812
+ ------------------------------------------------------------------------
813
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
814
+ ------------------------------------------------------------------------
815
+  (0.0ms) rollback transaction
816
+  (0.0ms) begin transaction
817
+ ---------------------------------------------------------
818
+ UsersControllerTest: test_returns_401_when_not_authorized
819
+ ---------------------------------------------------------
820
+ Processing by UsersController#index as JSON
821
+ Rendered text template (0.0ms)
822
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
823
+ Completed 401 Unauthorized in 37ms (Views: 35.7ms | ActiveRecord: 0.0ms)
824
+  (0.1ms) rollback transaction
825
+  (0.1ms) begin transaction
826
+ ---------------------------------------------------------
827
+ UsersControllerTest: test_returns_success_when_authorized
828
+ ---------------------------------------------------------
829
+  (0.0ms) SAVEPOINT active_record_1
830
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'CQERa-Ph14gigefdu4Gk' LIMIT 1
831
+ SQL (0.7ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "CQERa-Ph14gigefdu4Gk"], ["created_at", "2014-10-15 21:45:50.072914"], ["updated_at", "2014-10-15 21:45:50.072914"]]
832
+  (0.1ms) RELEASE SAVEPOINT active_record_1
833
+ Processing by UsersController#index as HTML
834
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
835
+ Completed 500 Internal Server Error in 2ms
836
+  (0.6ms) rollback transaction
837
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
838
+  (0.1ms) begin transaction
839
+ ---------------------------------------------------------
840
+ UsersControllerTest: test_returns_401_when_not_authorized
841
+ ---------------------------------------------------------
842
+ Processing by UsersController#index as JSON
843
+ Rendered text template (0.0ms)
844
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
845
+ Completed 401 Unauthorized in 36ms (Views: 34.8ms | ActiveRecord: 0.0ms)
846
+  (0.1ms) rollback transaction
847
+  (0.0ms) begin transaction
848
+ ---------------------------------------------------------
849
+ UsersControllerTest: test_returns_success_when_authorized
850
+ ---------------------------------------------------------
851
+  (0.0ms) SAVEPOINT active_record_1
852
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'Ugs93j1T7kycPN5MHkpf' LIMIT 1
853
+ SQL (0.3ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "Ugs93j1T7kycPN5MHkpf"], ["created_at", "2014-10-15 21:46:09.380536"], ["updated_at", "2014-10-15 21:46:09.380536"]]
854
+  (0.0ms) RELEASE SAVEPOINT active_record_1
855
+ Processing by UsersController#index as HTML
856
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
857
+ User Load (0.1ms) SELECT "users".* FROM "users"
858
+ Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)
859
+  (0.6ms) rollback transaction
860
+  (0.1ms) begin transaction
861
+ ------------------------------------------------------------------------
862
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
863
+ ------------------------------------------------------------------------
864
+  (0.0ms) rollback transaction
865
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
866
+  (0.1ms) begin transaction
867
+ ------------------------------------------------------------------------
868
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
869
+ ------------------------------------------------------------------------
870
+  (0.0ms) rollback transaction
871
+  (0.0ms) begin transaction
872
+ --------------------------------------------------------
873
+ UsersControllerTest: test_returns_401_when_invalid_token
874
+ --------------------------------------------------------
875
+  (0.0ms) SAVEPOINT active_record_1
876
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'zLRyF2u1Gmtv2aCyk8zr' LIMIT 1
877
+ SQL (0.3ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "zLRyF2u1Gmtv2aCyk8zr"], ["created_at", "2014-10-15 21:50:42.624790"], ["updated_at", "2014-10-15 21:50:42.624790"]]
878
+  (0.0ms) RELEASE SAVEPOINT active_record_1
879
+ Processing by UsersController#index as HTML
880
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
881
+ Rendered text template (0.0ms)
882
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
883
+ Completed 401 Unauthorized in 4ms (Views: 3.2ms | ActiveRecord: 0.1ms)
884
+  (0.6ms) rollback transaction
885
+  (0.1ms) begin transaction
886
+ ---------------------------------------------------------
887
+ UsersControllerTest: test_returns_401_when_not_authorized
888
+ ---------------------------------------------------------
889
+ Processing by UsersController#index as JSON
890
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
891
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
892
+  (0.0ms) rollback transaction
893
+  (0.0ms) begin transaction
894
+ ---------------------------------------------------------
895
+ UsersControllerTest: test_returns_success_when_authorized
896
+ ---------------------------------------------------------
897
+  (0.0ms) SAVEPOINT active_record_1
898
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'VQRAvJJ6xjVQsS7AQKYJ' LIMIT 1
899
+ SQL (0.2ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "VQRAvJJ6xjVQsS7AQKYJ"], ["created_at", "2014-10-15 21:50:42.638493"], ["updated_at", "2014-10-15 21:50:42.638493"]]
900
+  (0.0ms) RELEASE SAVEPOINT active_record_1
901
+ Processing by UsersController#index as HTML
902
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
903
+ User Load (0.1ms) SELECT "users".* FROM "users"
904
+ Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)
905
+  (0.4ms) rollback transaction
906
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
907
+  (0.1ms) begin transaction
908
+ ------------------------------------------------------------------------
909
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
910
+ ------------------------------------------------------------------------
911
+  (0.0ms) rollback transaction
912
+  (0.0ms) begin transaction
913
+ --------------------------------------------------------
914
+ UsersControllerTest: test_returns_401_when_invalid_token
915
+ --------------------------------------------------------
916
+  (0.0ms) SAVEPOINT active_record_1
917
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'zJ5LhkjEdGzsCfSyHY3x' LIMIT 1
918
+ SQL (0.3ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "zJ5LhkjEdGzsCfSyHY3x"], ["created_at", "2014-10-15 21:51:55.615777"], ["updated_at", "2014-10-15 21:51:55.615777"]]
919
+  (0.0ms) RELEASE SAVEPOINT active_record_1
920
+ Processing by UsersController#index as HTML
921
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
922
+ Rendered text template (0.0ms)
923
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
924
+ Completed 401 Unauthorized in 4ms (Views: 3.1ms | ActiveRecord: 0.1ms)
925
+  (0.7ms) rollback transaction
926
+  (0.1ms) begin transaction
927
+ ---------------------------------------------------------
928
+ UsersControllerTest: test_returns_401_when_not_authorized
929
+ ---------------------------------------------------------
930
+ Processing by UsersController#index as JSON
931
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
932
+ Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
933
+  (0.1ms) rollback transaction
934
+  (0.1ms) begin transaction
935
+ ---------------------------------------------------------
936
+ UsersControllerTest: test_returns_success_when_authorized
937
+ ---------------------------------------------------------
938
+  (0.1ms) SAVEPOINT active_record_1
939
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'k81Mbx7T5YhSRc2rQbXn' LIMIT 1
940
+ SQL (0.3ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "k81Mbx7T5YhSRc2rQbXn"], ["created_at", "2014-10-15 21:51:55.631603"], ["updated_at", "2014-10-15 21:51:55.631603"]]
941
+  (0.0ms) RELEASE SAVEPOINT active_record_1
942
+ Processing by UsersController#index as HTML
943
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
944
+ User Load (0.1ms) SELECT "users".* FROM "users"
945
+ Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms)
946
+  (8.2ms) rollback transaction
947
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
948
+  (0.1ms) begin transaction
949
+ ------------------------------------------------------------------------
950
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
951
+ ------------------------------------------------------------------------
952
+  (0.1ms) rollback transaction
953
+  (0.1ms) begin transaction
954
+ --------------------------------------------------------
955
+ UsersControllerTest: test_returns_401_when_invalid_token
956
+ --------------------------------------------------------
957
+  (0.0ms) SAVEPOINT active_record_1
958
+ User Exists (13.4ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'qYwNYuESz3EfR5vNLEsH' LIMIT 1
959
+ SQL (0.8ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "qYwNYuESz3EfR5vNLEsH"], ["created_at", "2014-10-15 22:14:30.610683"], ["updated_at", "2014-10-15 22:14:30.610683"]]
960
+  (0.1ms) RELEASE SAVEPOINT active_record_1
961
+ Processing by UsersController#index as HTML
962
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
963
+ Rendered text template (0.0ms)
964
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
965
+ Completed 401 Unauthorized in 40ms (Views: 38.6ms | ActiveRecord: 0.1ms)
966
+  (0.6ms) rollback transaction
967
+  (0.1ms) begin transaction
968
+ ---------------------------------------------------------
969
+ UsersControllerTest: test_returns_401_when_not_authorized
970
+ ---------------------------------------------------------
971
+ Processing by UsersController#index as JSON
972
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
973
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
974
+  (0.1ms) rollback transaction
975
+  (0.0ms) begin transaction
976
+ ---------------------------------------------------------
977
+ UsersControllerTest: test_returns_success_when_authorized
978
+ ---------------------------------------------------------
979
+  (0.0ms) SAVEPOINT active_record_1
980
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'tXtB31_8wQqWjHccVe8x' LIMIT 1
981
+ SQL (0.2ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "tXtB31_8wQqWjHccVe8x"], ["created_at", "2014-10-15 22:14:30.694231"], ["updated_at", "2014-10-15 22:14:30.694231"]]
982
+  (0.0ms) RELEASE SAVEPOINT active_record_1
983
+ Processing by UsersController#index as HTML
984
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
985
+ User Load (0.1ms) SELECT "users".* FROM "users"
986
+ Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.1ms)
987
+  (0.4ms) rollback transaction
988
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
989
+  (0.1ms) begin transaction
990
+ --------------------------------------------------------
991
+ UsersControllerTest: test_returns_401_when_invalid_token
992
+ --------------------------------------------------------
993
+  (0.0ms) SAVEPOINT active_record_1
994
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = '3ax9_3wyymFdY8E2B8iT' LIMIT 1
995
+ SQL (0.4ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "3ax9_3wyymFdY8E2B8iT"], ["created_at", "2014-10-15 22:15:35.372638"], ["updated_at", "2014-10-15 22:15:35.372638"]]
996
+  (0.0ms) RELEASE SAVEPOINT active_record_1
997
+ Processing by UsersController#index as HTML
998
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
999
+ Rendered text template (0.0ms)
1000
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1001
+ Completed 401 Unauthorized in 4ms (Views: 3.2ms | ActiveRecord: 0.1ms)
1002
+  (0.6ms) rollback transaction
1003
+  (0.1ms) begin transaction
1004
+ ---------------------------------------------------------
1005
+ UsersControllerTest: test_returns_401_when_not_authorized
1006
+ ---------------------------------------------------------
1007
+ Processing by UsersController#index as JSON
1008
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1009
+ Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
1010
+  (0.1ms) rollback transaction
1011
+  (0.0ms) begin transaction
1012
+ ---------------------------------------------------------
1013
+ UsersControllerTest: test_returns_success_when_authorized
1014
+ ---------------------------------------------------------
1015
+  (0.0ms) SAVEPOINT active_record_1
1016
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'DzsDmSM6BmP3D3y5PaST' LIMIT 1
1017
+ SQL (0.3ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "DzsDmSM6BmP3D3y5PaST"], ["created_at", "2014-10-15 22:15:35.388503"], ["updated_at", "2014-10-15 22:15:35.388503"]]
1018
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1019
+ Processing by UsersController#index as HTML
1020
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1021
+ User Load (0.1ms) SELECT "users".* FROM "users"
1022
+ Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms)
1023
+  (7.8ms) rollback transaction
1024
+  (0.1ms) begin transaction
1025
+ ------------------------------------------------------------------------
1026
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
1027
+ ------------------------------------------------------------------------
1028
+  (0.0ms) rollback transaction
1029
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1030
+  (0.1ms) begin transaction
1031
+ ------------------------------------------------------------------------
1032
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
1033
+ ------------------------------------------------------------------------
1034
+  (0.0ms) rollback transaction
1035
+  (0.0ms) begin transaction
1036
+ --------------------------------------------------------
1037
+ UsersControllerTest: test_returns_401_when_invalid_token
1038
+ --------------------------------------------------------
1039
+  (0.0ms) SAVEPOINT active_record_1
1040
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'XuDj2aUVZH37znBmxRJm' LIMIT 1
1041
+ SQL (0.3ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "XuDj2aUVZH37znBmxRJm"], ["created_at", "2014-10-15 22:15:54.623999"], ["updated_at", "2014-10-15 22:15:54.623999"]]
1042
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1043
+ Processing by UsersController#index as HTML
1044
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1045
+ Rendered text template (0.0ms)
1046
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1047
+ Completed 401 Unauthorized in 4ms (Views: 3.2ms | ActiveRecord: 0.1ms)
1048
+  (0.6ms) rollback transaction
1049
+  (0.1ms) begin transaction
1050
+ ---------------------------------------------------------
1051
+ UsersControllerTest: test_returns_401_when_not_authorized
1052
+ ---------------------------------------------------------
1053
+ Processing by UsersController#index as JSON
1054
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1055
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
1056
+  (0.0ms) rollback transaction
1057
+  (0.0ms) begin transaction
1058
+ ---------------------------------------------------------
1059
+ UsersControllerTest: test_returns_success_when_authorized
1060
+ ---------------------------------------------------------
1061
+  (0.0ms) SAVEPOINT active_record_1
1062
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'EfpVmEVyYDLMXe182tQ8' LIMIT 1
1063
+ SQL (0.4ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "EfpVmEVyYDLMXe182tQ8"], ["created_at", "2014-10-15 22:15:54.638417"], ["updated_at", "2014-10-15 22:15:54.638417"]]
1064
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1065
+ Processing by UsersController#index as HTML
1066
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1067
+ User Load (0.1ms) SELECT "users".* FROM "users"
1068
+ Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.1ms)
1069
+  (9.4ms) rollback transaction
1070
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1071
+  (0.1ms) begin transaction
1072
+ ------------------------------------------------------------------------
1073
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
1074
+ ------------------------------------------------------------------------
1075
+  (0.0ms) rollback transaction
1076
+  (0.0ms) begin transaction
1077
+ --------------------------------------------------------
1078
+ UsersControllerTest: test_returns_401_when_invalid_token
1079
+ --------------------------------------------------------
1080
+  (0.0ms) SAVEPOINT active_record_1
1081
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'v6xATCtUWrSy_pbQxnQT' LIMIT 1
1082
+ SQL (0.4ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "v6xATCtUWrSy_pbQxnQT"], ["created_at", "2014-10-15 22:17:07.067852"], ["updated_at", "2014-10-15 22:17:07.067852"]]
1083
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1084
+ Processing by UsersController#index as HTML
1085
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1086
+ Rendered text template (0.0ms)
1087
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1088
+ Completed 401 Unauthorized in 4ms (Views: 3.1ms | ActiveRecord: 0.1ms)
1089
+  (0.5ms) rollback transaction
1090
+  (0.0ms) begin transaction
1091
+ ---------------------------------------------------------
1092
+ UsersControllerTest: test_returns_401_when_not_authorized
1093
+ ---------------------------------------------------------
1094
+ Processing by UsersController#index as JSON
1095
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1096
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
1097
+  (0.0ms) rollback transaction
1098
+  (0.0ms) begin transaction
1099
+ ---------------------------------------------------------
1100
+ UsersControllerTest: test_returns_success_when_authorized
1101
+ ---------------------------------------------------------
1102
+  (0.0ms) SAVEPOINT active_record_1
1103
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = '9qnwDTcGz93ZhxbtTLxg' LIMIT 1
1104
+ SQL (0.2ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "9qnwDTcGz93ZhxbtTLxg"], ["created_at", "2014-10-15 22:17:07.081550"], ["updated_at", "2014-10-15 22:17:07.081550"]]
1105
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1106
+ Processing by UsersController#index as HTML
1107
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1108
+ User Load (0.1ms) SELECT "users".* FROM "users"
1109
+ Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)
1110
+  (0.4ms) rollback transaction
1111
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1112
+  (0.1ms) begin transaction
1113
+ ------------------------------------------------------------------------
1114
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
1115
+ ------------------------------------------------------------------------
1116
+  (0.0ms) rollback transaction
1117
+  (0.0ms) begin transaction
1118
+ --------------------------------------------------------
1119
+ UsersControllerTest: test_returns_401_when_invalid_token
1120
+ --------------------------------------------------------
1121
+  (0.0ms) SAVEPOINT active_record_1
1122
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'shit' LIMIT 1
1123
+ SQL (0.4ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "shit"], ["created_at", "2014-10-15 22:17:45.210789"], ["updated_at", "2014-10-15 22:17:45.210789"]]
1124
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1125
+ Processing by UsersController#index as HTML
1126
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1127
+ Rendered text template (0.0ms)
1128
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1129
+ Completed 401 Unauthorized in 4ms (Views: 3.4ms | ActiveRecord: 0.1ms)
1130
+  (0.6ms) rollback transaction
1131
+  (0.1ms) begin transaction
1132
+ ---------------------------------------------------------
1133
+ UsersControllerTest: test_returns_401_when_not_authorized
1134
+ ---------------------------------------------------------
1135
+ Processing by UsersController#index as JSON
1136
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1137
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
1138
+  (0.0ms) rollback transaction
1139
+  (0.0ms) begin transaction
1140
+ ---------------------------------------------------------
1141
+ UsersControllerTest: test_returns_success_when_authorized
1142
+ ---------------------------------------------------------
1143
+  (0.0ms) SAVEPOINT active_record_1
1144
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'shit' LIMIT 1
1145
+ SQL (0.2ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "shit"], ["created_at", "2014-10-15 22:17:45.225329"], ["updated_at", "2014-10-15 22:17:45.225329"]]
1146
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1147
+ Processing by UsersController#index as HTML
1148
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1149
+ User Load (0.1ms) SELECT "users".* FROM "users"
1150
+ Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)
1151
+  (9.7ms) rollback transaction
1152
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1153
+  (0.1ms) begin transaction
1154
+ --------------------------------------------------------
1155
+ UsersControllerTest: test_returns_401_when_invalid_token
1156
+ --------------------------------------------------------
1157
+  (0.0ms) SAVEPOINT active_record_1
1158
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1159
+  (0.1ms) rollback transaction
1160
+  (0.0ms) begin transaction
1161
+ ---------------------------------------------------------
1162
+ UsersControllerTest: test_returns_401_when_not_authorized
1163
+ ---------------------------------------------------------
1164
+ Processing by UsersController#index as JSON
1165
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1166
+ Completed 401 Unauthorized in 6ms (Views: 5.1ms | ActiveRecord: 0.0ms)
1167
+  (0.1ms) rollback transaction
1168
+  (0.0ms) begin transaction
1169
+ ---------------------------------------------------------
1170
+ UsersControllerTest: test_returns_success_when_authorized
1171
+ ---------------------------------------------------------
1172
+  (0.0ms) SAVEPOINT active_record_1
1173
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1174
+  (0.0ms) rollback transaction
1175
+  (0.0ms) begin transaction
1176
+ ------------------------------------------------------------------------
1177
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
1178
+ ------------------------------------------------------------------------
1179
+  (0.0ms) rollback transaction
1180
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1181
+  (0.1ms) begin transaction
1182
+ ------------------------------------------------------------------------
1183
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
1184
+ ------------------------------------------------------------------------
1185
+  (0.1ms) rollback transaction
1186
+  (0.1ms) begin transaction
1187
+ --------------------------------------------------------
1188
+ UsersControllerTest: test_returns_401_when_invalid_token
1189
+ --------------------------------------------------------
1190
+  (0.0ms) SAVEPOINT active_record_1
1191
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1192
+  (0.1ms) rollback transaction
1193
+  (0.0ms) begin transaction
1194
+ ---------------------------------------------------------
1195
+ UsersControllerTest: test_returns_401_when_not_authorized
1196
+ ---------------------------------------------------------
1197
+ Processing by UsersController#index as JSON
1198
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1199
+ Completed 401 Unauthorized in 4ms (Views: 3.5ms | ActiveRecord: 0.0ms)
1200
+  (0.1ms) rollback transaction
1201
+  (0.0ms) begin transaction
1202
+ ---------------------------------------------------------
1203
+ UsersControllerTest: test_returns_success_when_authorized
1204
+ ---------------------------------------------------------
1205
+  (0.0ms) SAVEPOINT active_record_1
1206
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1207
+  (0.0ms) rollback transaction
1208
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1209
+  (0.1ms) begin transaction
1210
+ --------------------------------------------------------
1211
+ UsersControllerTest: test_returns_401_when_invalid_token
1212
+ --------------------------------------------------------
1213
+  (0.0ms) SAVEPOINT active_record_1
1214
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'rnMEGxxAK4kyfzJFKMey' LIMIT 1
1215
+ SQL (0.4ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "rnMEGxxAK4kyfzJFKMey"], ["created_at", "2014-10-15 22:23:53.422500"], ["updated_at", "2014-10-15 22:23:53.422500"]]
1216
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1217
+ Processing by UsersController#index as HTML
1218
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1219
+ Rendered text template (0.0ms)
1220
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1221
+ Completed 401 Unauthorized in 4ms (Views: 3.3ms | ActiveRecord: 0.1ms)
1222
+  (0.6ms) rollback transaction
1223
+  (0.1ms) begin transaction
1224
+ ---------------------------------------------------------
1225
+ UsersControllerTest: test_returns_401_when_not_authorized
1226
+ ---------------------------------------------------------
1227
+ Processing by UsersController#index as JSON
1228
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1229
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
1230
+  (0.1ms) rollback transaction
1231
+  (0.0ms) begin transaction
1232
+ ---------------------------------------------------------
1233
+ UsersControllerTest: test_returns_success_when_authorized
1234
+ ---------------------------------------------------------
1235
+  (0.1ms) SAVEPOINT active_record_1
1236
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = '_L2x6sMXb4wMxMBbQPH-' LIMIT 1
1237
+ SQL (0.3ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "_L2x6sMXb4wMxMBbQPH-"], ["created_at", "2014-10-15 22:23:53.438223"], ["updated_at", "2014-10-15 22:23:53.438223"]]
1238
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1239
+ Processing by UsersController#index as HTML
1240
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1241
+ User Load (0.1ms) SELECT "users".* FROM "users"
1242
+ Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.1ms)
1243
+  (0.5ms) rollback transaction
1244
+  (0.0ms) begin transaction
1245
+ ------------------------------------------------------------------------
1246
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
1247
+ ------------------------------------------------------------------------
1248
+  (0.0ms) rollback transaction
1249
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1250
+  (0.1ms) begin transaction
1251
+ --------------------------------------------------------
1252
+ UsersControllerTest: test_returns_401_when_invalid_token
1253
+ --------------------------------------------------------
1254
+  (0.0ms) SAVEPOINT active_record_1
1255
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'bzVZ1B7b9xscYQ38jg88' LIMIT 1
1256
+ SQL (0.4ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "bzVZ1B7b9xscYQ38jg88"], ["created_at", "2014-10-15 22:24:38.366738"], ["updated_at", "2014-10-15 22:24:38.366738"]]
1257
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1258
+ Processing by UsersController#index as HTML
1259
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1260
+ Rendered text template (0.0ms)
1261
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1262
+ Completed 401 Unauthorized in 5ms (Views: 3.7ms | ActiveRecord: 0.1ms)
1263
+  (0.6ms) rollback transaction
1264
+  (0.1ms) begin transaction
1265
+ ---------------------------------------------------------
1266
+ UsersControllerTest: test_returns_401_when_not_authorized
1267
+ ---------------------------------------------------------
1268
+ Processing by UsersController#index as JSON
1269
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1270
+ Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
1271
+  (0.1ms) rollback transaction
1272
+  (0.0ms) begin transaction
1273
+ ---------------------------------------------------------
1274
+ UsersControllerTest: test_returns_success_when_authorized
1275
+ ---------------------------------------------------------
1276
+  (0.0ms) SAVEPOINT active_record_1
1277
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'GNwu7znexYzdXzom551B' LIMIT 1
1278
+ SQL (0.2ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "GNwu7znexYzdXzom551B"], ["created_at", "2014-10-15 22:24:38.382973"], ["updated_at", "2014-10-15 22:24:38.382973"]]
1279
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1280
+ Processing by UsersController#index as HTML
1281
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1282
+ User Load (0.1ms) SELECT "users".* FROM "users"
1283
+ Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)
1284
+  (0.6ms) rollback transaction
1285
+  (0.1ms) begin transaction
1286
+ ------------------------------------------------------------------------
1287
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
1288
+ ------------------------------------------------------------------------
1289
+  (0.1ms) rollback transaction
1290
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1291
+  (0.1ms) begin transaction
1292
+ --------------------------------------------------------
1293
+ UsersControllerTest: test_returns_401_when_invalid_token
1294
+ --------------------------------------------------------
1295
+  (0.0ms) SAVEPOINT active_record_1
1296
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'Cm66eBKYLhz-6YtvRvjP' LIMIT 1
1297
+ SQL (0.4ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "Cm66eBKYLhz-6YtvRvjP"], ["created_at", "2014-10-15 22:24:47.331785"], ["updated_at", "2014-10-15 22:24:47.331785"]]
1298
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1299
+ Processing by UsersController#index as HTML
1300
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1301
+ Rendered text template (0.0ms)
1302
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1303
+ Completed 401 Unauthorized in 4ms (Views: 3.3ms | ActiveRecord: 0.1ms)
1304
+  (0.5ms) rollback transaction
1305
+  (0.1ms) begin transaction
1306
+ ---------------------------------------------------------
1307
+ UsersControllerTest: test_returns_401_when_not_authorized
1308
+ ---------------------------------------------------------
1309
+ Processing by UsersController#index as JSON
1310
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1311
+ Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
1312
+  (0.1ms) rollback transaction
1313
+  (0.0ms) begin transaction
1314
+ ---------------------------------------------------------
1315
+ UsersControllerTest: test_returns_success_when_authorized
1316
+ ---------------------------------------------------------
1317
+  (0.0ms) SAVEPOINT active_record_1
1318
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'dJgDgxXKq1LELpbyRvD4' LIMIT 1
1319
+ SQL (0.2ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "dJgDgxXKq1LELpbyRvD4"], ["created_at", "2014-10-15 22:24:47.346809"], ["updated_at", "2014-10-15 22:24:47.346809"]]
1320
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1321
+ Processing by UsersController#index as HTML
1322
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1323
+ Completed 500 Internal Server Error in 1ms
1324
+  (0.5ms) rollback transaction
1325
+  (0.0ms) begin transaction
1326
+ ------------------------------------------------------------------------
1327
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
1328
+ ------------------------------------------------------------------------
1329
+  (0.0ms) rollback transaction
1330
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1331
+  (0.1ms) begin transaction
1332
+ --------------------------------------------------------
1333
+ UsersControllerTest: test_returns_401_when_invalid_token
1334
+ --------------------------------------------------------
1335
+  (0.0ms) SAVEPOINT active_record_1
1336
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'qvnWutkSVeDTwL4we-yL' LIMIT 1
1337
+ SQL (0.3ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "qvnWutkSVeDTwL4we-yL"], ["created_at", "2014-10-15 22:25:08.525374"], ["updated_at", "2014-10-15 22:25:08.525374"]]
1338
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1339
+ Processing by UsersController#index as HTML
1340
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1341
+ Rendered text template (0.0ms)
1342
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1343
+ Completed 401 Unauthorized in 4ms (Views: 3.2ms | ActiveRecord: 0.1ms)
1344
+  (0.5ms) rollback transaction
1345
+  (0.1ms) begin transaction
1346
+ ---------------------------------------------------------
1347
+ UsersControllerTest: test_returns_401_when_not_authorized
1348
+ ---------------------------------------------------------
1349
+ Processing by UsersController#index as JSON
1350
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1351
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
1352
+  (0.0ms) rollback transaction
1353
+  (0.0ms) begin transaction
1354
+ ---------------------------------------------------------
1355
+ UsersControllerTest: test_returns_success_when_authorized
1356
+ ---------------------------------------------------------
1357
+  (0.0ms) SAVEPOINT active_record_1
1358
+ User Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'qmb8yPJsU2-C16KM1YaT' LIMIT 1
1359
+ SQL (0.4ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "qmb8yPJsU2-C16KM1YaT"], ["created_at", "2014-10-15 22:25:08.539701"], ["updated_at", "2014-10-15 22:25:08.539701"]]
1360
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1361
+ Processing by UsersController#index as HTML
1362
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1363
+ Completed 500 Internal Server Error in 1ms
1364
+  (0.5ms) rollback transaction
1365
+  (0.0ms) begin transaction
1366
+ ------------------------------------------------------------------------
1367
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
1368
+ ------------------------------------------------------------------------
1369
+  (0.0ms) rollback transaction
1370
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1371
+  (0.1ms) begin transaction
1372
+ --------------------------------------------------------
1373
+ UsersControllerTest: test_returns_401_when_invalid_token
1374
+ --------------------------------------------------------
1375
+  (0.1ms) SAVEPOINT active_record_1
1376
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = '4Muz3sV3YMd7zFDLyAkd' LIMIT 1
1377
+ SQL (0.4ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "4Muz3sV3YMd7zFDLyAkd"], ["created_at", "2014-10-15 22:29:05.467148"], ["updated_at", "2014-10-15 22:29:05.467148"]]
1378
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1379
+ Processing by UsersController#index as HTML
1380
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1381
+ Rendered text template (0.0ms)
1382
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1383
+ Completed 401 Unauthorized in 4ms (Views: 3.2ms | ActiveRecord: 0.1ms)
1384
+  (0.7ms) rollback transaction
1385
+  (0.1ms) begin transaction
1386
+ ---------------------------------------------------------
1387
+ UsersControllerTest: test_returns_401_when_not_authorized
1388
+ ---------------------------------------------------------
1389
+ Processing by UsersController#index as JSON
1390
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1391
+ Completed 401 Unauthorized in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
1392
+  (0.1ms) rollback transaction
1393
+  (0.0ms) begin transaction
1394
+ ---------------------------------------------------------
1395
+ UsersControllerTest: test_returns_success_when_authorized
1396
+ ---------------------------------------------------------
1397
+  (0.0ms) SAVEPOINT active_record_1
1398
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'EoyVzMsMUr9TvUWxQbtd' LIMIT 1
1399
+ SQL (0.2ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "EoyVzMsMUr9TvUWxQbtd"], ["created_at", "2014-10-15 22:29:05.482264"], ["updated_at", "2014-10-15 22:29:05.482264"]]
1400
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1401
+ Processing by UsersController#index as HTML
1402
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1403
+ Completed 500 Internal Server Error in 1ms
1404
+  (10.5ms) rollback transaction
1405
+  (0.1ms) begin transaction
1406
+ ------------------------------------------------------------------------
1407
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
1408
+ ------------------------------------------------------------------------
1409
+  (0.0ms) rollback transaction
1410
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1411
+  (0.1ms) begin transaction
1412
+ --------------------------------------------------------
1413
+ UsersControllerTest: test_returns_401_when_invalid_token
1414
+ --------------------------------------------------------
1415
+  (0.0ms) SAVEPOINT active_record_1
1416
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'TCRsJ-4CeQ4ucTTcyaTJ' LIMIT 1
1417
+ SQL (0.4ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "TCRsJ-4CeQ4ucTTcyaTJ"], ["created_at", "2014-10-15 22:29:29.476225"], ["updated_at", "2014-10-15 22:29:29.476225"]]
1418
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1419
+ Processing by UsersController#index as HTML
1420
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1421
+ Rendered text template (0.0ms)
1422
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1423
+ Completed 401 Unauthorized in 4ms (Views: 3.1ms | ActiveRecord: 0.1ms)
1424
+  (0.7ms) rollback transaction
1425
+  (0.0ms) begin transaction
1426
+ ---------------------------------------------------------
1427
+ UsersControllerTest: test_returns_401_when_not_authorized
1428
+ ---------------------------------------------------------
1429
+ Processing by UsersController#index as JSON
1430
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1431
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
1432
+  (0.1ms) rollback transaction
1433
+  (0.0ms) begin transaction
1434
+ ---------------------------------------------------------
1435
+ UsersControllerTest: test_returns_success_when_authorized
1436
+ ---------------------------------------------------------
1437
+  (0.0ms) SAVEPOINT active_record_1
1438
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'sr3MZHFeFZQaMXZrAyCB' LIMIT 1
1439
+ SQL (0.2ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "sr3MZHFeFZQaMXZrAyCB"], ["created_at", "2014-10-15 22:29:29.489956"], ["updated_at", "2014-10-15 22:29:29.489956"]]
1440
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1441
+ Processing by UsersController#index as HTML
1442
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1443
+ User Load (0.1ms) SELECT "users".* FROM "users"
1444
+ Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)
1445
+  (0.6ms) rollback transaction
1446
+  (0.1ms) begin transaction
1447
+ ------------------------------------------------------------------------
1448
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
1449
+ ------------------------------------------------------------------------
1450
+  (0.1ms) rollback transaction
1451
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
1452
+  (0.1ms) begin transaction
1453
+ --------------------------------------------------------
1454
+ UsersControllerTest: test_returns_401_when_invalid_token
1455
+ --------------------------------------------------------
1456
+  (0.0ms) SAVEPOINT active_record_1
1457
+ User Exists (10.9ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'wzeTe8ACbp-KhsyxnRQR' LIMIT 1
1458
+ SQL (1.0ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "wzeTe8ACbp-KhsyxnRQR"], ["created_at", "2014-11-25 18:33:50.782279"], ["updated_at", "2014-11-25 18:33:50.782279"]]
1459
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1460
+ Processing by UsersController#index as HTML
1461
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1462
+ Rendered text template (0.0ms)
1463
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1464
+ Completed 401 Unauthorized in 51ms (Views: 49.2ms | ActiveRecord: 0.1ms)
1465
+  (12.3ms) rollback transaction
1466
+  (0.1ms) begin transaction
1467
+ ---------------------------------------------------------
1468
+ UsersControllerTest: test_returns_401_when_not_authorized
1469
+ ---------------------------------------------------------
1470
+ Processing by UsersController#index as JSON
1471
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1472
+ Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
1473
+  (0.1ms) rollback transaction
1474
+  (0.0ms) begin transaction
1475
+ ---------------------------------------------------------
1476
+ UsersControllerTest: test_returns_success_when_authorized
1477
+ ---------------------------------------------------------
1478
+  (0.0ms) SAVEPOINT active_record_1
1479
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = '8y6BaaTrzPrZn1yLvNwo' LIMIT 1
1480
+ SQL (0.2ms) INSERT INTO "users" ("authentication_token", "created_at", "updated_at") VALUES (?, ?, ?) [["authentication_token", "8y6BaaTrzPrZn1yLvNwo"], ["created_at", "2014-11-25 18:33:50.890431"], ["updated_at", "2014-11-25 18:33:50.890431"]]
1481
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1482
+ Processing by UsersController#index as HTML
1483
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1484
+ User Load (0.1ms) SELECT "users".* FROM "users"
1485
+ Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms)
1486
+  (0.5ms) rollback transaction
1487
+  (0.0ms) begin transaction
1488
+ ------------------------------------------------------------------------
1489
+ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy
1490
+ ------------------------------------------------------------------------
1491
+  (0.0ms) rollback transaction
1492
+  (0.1ms) begin transaction
1493
+ --------------------------------------------------------
1494
+ UsersControllerTest: test_returns_401_when_invalid_token
1495
+ --------------------------------------------------------
1496
+  (0.1ms) rollback transaction
1497
+  (0.1ms) begin transaction
1498
+ ---------------------------------------------------------
1499
+ UsersControllerTest: test_returns_401_when_not_authorized
1500
+ ---------------------------------------------------------
1501
+ Processing by UsersController#index as JSON
1502
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1503
+ Completed 401 Unauthorized in 27ms (Views: 26.7ms | ActiveRecord: 0.0ms)
1504
+  (0.1ms) rollback transaction
1505
+  (0.1ms) begin transaction
1506
+ -----------------------------------------------------------
1507
+ UsersControllerTest: test_returns_401_when_token_is_expired
1508
+ -----------------------------------------------------------
1509
+  (0.1ms) rollback transaction
1510
+  (0.0ms) begin transaction
1511
+ ---------------------------------------------------------
1512
+ UsersControllerTest: test_returns_success_when_authorized
1513
+ ---------------------------------------------------------
1514
+  (0.0ms) rollback transaction
1515
+  (0.0ms) begin transaction
1516
+ ---------------------------------
1517
+ UserTest: test_ensures_an_api_key
1518
+ ---------------------------------
1519
+  (0.0ms) rollback transaction
1520
+  (0.0ms) begin transaction
1521
+ ---------------------------------------------------------------
1522
+ SimpleTokenAuthTest: test_sets_generate_authentication_strategy
1523
+ ---------------------------------------------------------------
1524
+  (0.0ms) rollback transaction
1525
+  (1.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
1526
+  (0.1ms) select sqlite_version(*)
1527
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1528
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1529
+ Migrating to CreateUsers (20141015200820)
1530
+  (0.1ms) begin transaction
1531
+  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)
1532
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141015200820"]]
1533
+  (1.3ms) commit transaction
1534
+ Migrating to SimpleTokenAuthMigration (20141203033703)
1535
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1536
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1537
+ Migrating to CreateUsers (20141015200820)
1538
+  (0.1ms) begin transaction
1539
+  (0.5ms) DROP TABLE "users"
1540
+ SQL (0.1ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = '20141015200820'
1541
+  (0.9ms) commit transaction
1542
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1543
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1544
+ Migrating to CreateUsers (20141015200820)
1545
+  (0.1ms) begin transaction
1546
+  (0.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) 
1547
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141015200820"]]
1548
+  (1.2ms) commit transaction
1549
+ Migrating to SimpleTokenAuthMigration (20141203034209)
1550
+  (0.1ms) begin transaction
1551
+  (0.3ms) CREATE TABLE "api_keys" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "token_authenticatable_id" integer NOT NULL, "token_authenticatable_type" varchar(255) NOT NULL, "access_token" varchar(255) NOT NULL, "expired_at" datetime, "created_at" datetime) 
1552
+  (0.1ms) select sqlite_version(*)
1553
+  (1.0ms) CREATE UNIQUE INDEX "index_api_keys_on_access_token" ON "api_keys" ("access_token")
1554
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141203034209"]]
1555
+  (3.9ms) commit transaction
1556
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1557
+  (0.1ms)  SELECT sql
1558
+ FROM sqlite_master
1559
+ WHERE name='index_api_keys_on_access_token' AND type='index'
1560
+ UNION ALL
1561
+ SELECT sql
1562
+ FROM sqlite_temp_master
1563
+ WHERE name='index_api_keys_on_access_token' AND type='index'
1564
+ 
1565
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1566
+  (0.1ms) begin transaction
1567
+ ---------------------------------
1568
+ UserTest: test_ensures_an_api_key
1569
+ ---------------------------------
1570
+  (0.0ms) SAVEPOINT active_record_1
1571
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1572
+  (0.0ms) rollback transaction
1573
+  (0.0ms) begin transaction
1574
+ --------------------------------------------------------
1575
+ UsersControllerTest: test_returns_401_when_invalid_token
1576
+ --------------------------------------------------------
1577
+  (0.1ms) SAVEPOINT active_record_1
1578
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1579
+  (0.0ms) rollback transaction
1580
+  (0.0ms) begin transaction
1581
+ ---------------------------------------------------------
1582
+ UsersControllerTest: test_returns_401_when_not_authorized
1583
+ ---------------------------------------------------------
1584
+ Processing by UsersController#index as JSON
1585
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1586
+ Completed 401 Unauthorized in 3ms (Views: 3.1ms | ActiveRecord: 0.0ms)
1587
+  (0.1ms) rollback transaction
1588
+  (0.0ms) begin transaction
1589
+ -----------------------------------------------------------
1590
+ UsersControllerTest: test_returns_401_when_token_is_expired
1591
+ -----------------------------------------------------------
1592
+  (0.0ms) rollback transaction
1593
+  (0.0ms) begin transaction
1594
+ ---------------------------------------------------------
1595
+ UsersControllerTest: test_returns_success_when_authorized
1596
+ ---------------------------------------------------------
1597
+  (0.0ms) SAVEPOINT active_record_1
1598
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1599
+  (0.0ms) rollback transaction
1600
+  (0.0ms) begin transaction
1601
+ ---------------------------------------------------------------
1602
+ SimpleTokenAuthTest: test_sets_generate_authentication_strategy
1603
+ ---------------------------------------------------------------
1604
+  (0.0ms) rollback transaction
1605
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1606
+  (0.1ms) begin transaction
1607
+ ---------------------------------------------------------------
1608
+ SimpleTokenAuthTest: test_sets_generate_authentication_strategy
1609
+ ---------------------------------------------------------------
1610
+  (0.0ms) rollback transaction
1611
+  (0.0ms) begin transaction
1612
+ --------------------------------------------------------
1613
+ UsersControllerTest: test_returns_401_when_invalid_token
1614
+ --------------------------------------------------------
1615
+  (0.0ms) SAVEPOINT active_record_1
1616
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '93866f9481bc46297e2628cc35ce8c31' LIMIT 1
1617
+ SQL (0.5ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_type") VALUES (?, ?, ?, ?) [["access_token", "93866f9481bc46297e2628cc35ce8c31"], ["created_at", "2014-12-03 03:45:55.430072"], ["expired_at", "2014-12-03 06:45:55.439254"], ["token_authenticatable_type", "User"]]
1618
+ SQLite3::ConstraintException: NOT NULL constraint failed: api_keys.token_authenticatable_id: INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_type") VALUES (?, ?, ?, ?)
1619
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
1620
+  (0.1ms) rollback transaction
1621
+  (0.1ms) begin transaction
1622
+ ---------------------------------------------------------
1623
+ UsersControllerTest: test_returns_401_when_not_authorized
1624
+ ---------------------------------------------------------
1625
+ Processing by UsersController#index as JSON
1626
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1627
+ Completed 401 Unauthorized in 4ms (Views: 3.7ms | ActiveRecord: 0.0ms)
1628
+  (0.1ms) rollback transaction
1629
+  (0.0ms) begin transaction
1630
+ -----------------------------------------------------------
1631
+ UsersControllerTest: test_returns_401_when_token_is_expired
1632
+ -----------------------------------------------------------
1633
+  (0.0ms) rollback transaction
1634
+  (0.0ms) begin transaction
1635
+ ---------------------------------------------------------
1636
+ UsersControllerTest: test_returns_success_when_authorized
1637
+ ---------------------------------------------------------
1638
+  (0.0ms) SAVEPOINT active_record_1
1639
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'bb56bd016e643eb581d6141b315e887f' LIMIT 1
1640
+ SQL (0.2ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_type") VALUES (?, ?, ?, ?) [["access_token", "bb56bd016e643eb581d6141b315e887f"], ["created_at", "2014-12-03 03:45:55.472837"], ["expired_at", "2014-12-03 06:45:55.473635"], ["token_authenticatable_type", "User"]]
1641
+ SQLite3::ConstraintException: NOT NULL constraint failed: api_keys.token_authenticatable_id: INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_type") VALUES (?, ?, ?, ?)
1642
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1643
+  (0.1ms) rollback transaction
1644
+  (0.0ms) begin transaction
1645
+ ---------------------------------
1646
+ UserTest: test_ensures_an_api_key
1647
+ ---------------------------------
1648
+  (0.0ms) SAVEPOINT active_record_1
1649
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '26e9d1db537f4f9cdccef1e6e1169f26' LIMIT 1
1650
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_type") VALUES (?, ?, ?, ?) [["access_token", "26e9d1db537f4f9cdccef1e6e1169f26"], ["created_at", "2014-12-03 03:45:55.476631"], ["expired_at", "2014-12-03 06:45:55.477080"], ["token_authenticatable_type", "User"]]
1651
+ SQLite3::ConstraintException: NOT NULL constraint failed: api_keys.token_authenticatable_id: INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_type") VALUES (?, ?, ?, ?)
1652
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1653
+  (0.1ms) rollback transaction
1654
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1655
+  (0.1ms) begin transaction
1656
+ ---------------------------------------------------------------
1657
+ SimpleTokenAuthTest: test_sets_generate_authentication_strategy
1658
+ ---------------------------------------------------------------
1659
+  (0.0ms) rollback transaction
1660
+  (0.0ms) begin transaction
1661
+ --------------------------------------------------------
1662
+ UsersControllerTest: test_returns_401_when_invalid_token
1663
+ --------------------------------------------------------
1664
+  (0.0ms) SAVEPOINT active_record_1
1665
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 03:48:58.219271"], ["updated_at", "2014-12-03 03:48:58.219271"]]
1666
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '27807cb4d6155fcc5a1c5182ab117dd5' LIMIT 1
1667
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "27807cb4d6155fcc5a1c5182ab117dd5"], ["created_at", "2014-12-03 03:48:58.223349"], ["expired_at", "2014-12-03 06:48:58.228962"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1668
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1669
+ Processing by UsersController#index as HTML
1670
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1671
+ Completed 500 Internal Server Error in 1ms
1672
+  (0.6ms) rollback transaction
1673
+  (0.1ms) begin transaction
1674
+ ---------------------------------------------------------
1675
+ UsersControllerTest: test_returns_401_when_not_authorized
1676
+ ---------------------------------------------------------
1677
+ Processing by UsersController#index as JSON
1678
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1679
+ Completed 401 Unauthorized in 5ms (Views: 4.4ms | ActiveRecord: 0.0ms)
1680
+  (0.1ms) rollback transaction
1681
+  (0.0ms) begin transaction
1682
+ -----------------------------------------------------------
1683
+ UsersControllerTest: test_returns_401_when_token_is_expired
1684
+ -----------------------------------------------------------
1685
+  (0.0ms) rollback transaction
1686
+  (0.0ms) begin transaction
1687
+ ---------------------------------------------------------
1688
+ UsersControllerTest: test_returns_success_when_authorized
1689
+ ---------------------------------------------------------
1690
+  (0.0ms) SAVEPOINT active_record_1
1691
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 03:48:58.244030"], ["updated_at", "2014-12-03 03:48:58.244030"]]
1692
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '926b79890bee2342f50d2dcb4c4489f9' LIMIT 1
1693
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "926b79890bee2342f50d2dcb4c4489f9"], ["created_at", "2014-12-03 03:48:58.245136"], ["expired_at", "2014-12-03 06:48:58.245890"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1694
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1695
+  (0.4ms) rollback transaction
1696
+  (0.0ms) begin transaction
1697
+ ---------------------------------
1698
+ UserTest: test_ensures_an_api_key
1699
+ ---------------------------------
1700
+  (0.0ms) SAVEPOINT active_record_1
1701
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 03:48:58.248761"], ["updated_at", "2014-12-03 03:48:58.248761"]]
1702
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '784997b32a32aa8df09daf696e7166fd' LIMIT 1
1703
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "784997b32a32aa8df09daf696e7166fd"], ["created_at", "2014-12-03 03:48:58.249436"], ["expired_at", "2014-12-03 06:48:58.249907"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1704
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1705
+  (0.4ms) rollback transaction
1706
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1707
+  (0.1ms) begin transaction
1708
+ ---------------------------------
1709
+ UserTest: test_ensures_an_api_key
1710
+ ---------------------------------
1711
+  (0.0ms) SAVEPOINT active_record_1
1712
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 03:49:20.098382"], ["updated_at", "2014-12-03 03:49:20.098382"]]
1713
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '4cbb9d17edc0f2a3b22a717ac56830d3' LIMIT 1
1714
+ SQL (0.2ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "4cbb9d17edc0f2a3b22a717ac56830d3"], ["created_at", "2014-12-03 03:49:20.103195"], ["expired_at", "2014-12-03 06:49:20.110712"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1715
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1716
+  (0.5ms) rollback transaction
1717
+  (0.1ms) begin transaction
1718
+ ---------------------------------------------------------------
1719
+ SimpleTokenAuthTest: test_sets_generate_authentication_strategy
1720
+ ---------------------------------------------------------------
1721
+  (0.0ms) rollback transaction
1722
+  (0.0ms) begin transaction
1723
+ --------------------------------------------------------
1724
+ UsersControllerTest: test_returns_401_when_invalid_token
1725
+ --------------------------------------------------------
1726
+  (0.1ms) SAVEPOINT active_record_1
1727
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 03:49:20.141959"], ["updated_at", "2014-12-03 03:49:20.141959"]]
1728
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '75402dfb2e82bcf87666860bc3159ab6' LIMIT 1
1729
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "75402dfb2e82bcf87666860bc3159ab6"], ["created_at", "2014-12-03 03:49:20.142940"], ["expired_at", "2014-12-03 06:49:20.143563"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1730
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1731
+ Processing by UsersController#index as HTML
1732
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1733
+ Completed 500 Internal Server Error in 1ms
1734
+  (0.4ms) rollback transaction
1735
+  (0.0ms) begin transaction
1736
+ ---------------------------------------------------------
1737
+ UsersControllerTest: test_returns_401_when_not_authorized
1738
+ ---------------------------------------------------------
1739
+ Processing by UsersController#index as JSON
1740
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1741
+ Completed 401 Unauthorized in 3ms (Views: 3.2ms | ActiveRecord: 0.0ms)
1742
+  (0.1ms) rollback transaction
1743
+  (0.0ms) begin transaction
1744
+ -----------------------------------------------------------
1745
+ UsersControllerTest: test_returns_401_when_token_is_expired
1746
+ -----------------------------------------------------------
1747
+  (0.0ms) rollback transaction
1748
+  (0.0ms) begin transaction
1749
+ ---------------------------------------------------------
1750
+ UsersControllerTest: test_returns_success_when_authorized
1751
+ ---------------------------------------------------------
1752
+  (0.0ms) SAVEPOINT active_record_1
1753
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 03:49:20.155677"], ["updated_at", "2014-12-03 03:49:20.155677"]]
1754
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'a1e9781c207fc52824a7b384fc2fad31' LIMIT 1
1755
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "a1e9781c207fc52824a7b384fc2fad31"], ["created_at", "2014-12-03 03:49:20.156620"], ["expired_at", "2014-12-03 06:49:20.157250"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1756
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1757
+ Processing by UsersController#index as HTML
1758
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1759
+ Completed 500 Internal Server Error in 1ms
1760
+  (0.4ms) rollback transaction
1761
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1762
+  (0.1ms) begin transaction
1763
+ ---------------------------------
1764
+ UserTest: test_ensures_an_api_key
1765
+ ---------------------------------
1766
+  (0.0ms) SAVEPOINT active_record_1
1767
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 03:49:54.633736"], ["updated_at", "2014-12-03 03:49:54.633736"]]
1768
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '3b309cc222040c50e52ac34844069077' LIMIT 1
1769
+ SQL (0.2ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "3b309cc222040c50e52ac34844069077"], ["created_at", "2014-12-03 03:49:54.637878"], ["expired_at", "2014-12-03 06:49:54.643380"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1770
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1771
+  (0.5ms) rollback transaction
1772
+  (0.1ms) begin transaction
1773
+ ---------------------------------------------------------------
1774
+ SimpleTokenAuthTest: test_sets_generate_authentication_strategy
1775
+ ---------------------------------------------------------------
1776
+  (0.1ms) rollback transaction
1777
+  (0.0ms) begin transaction
1778
+ --------------------------------------------------------
1779
+ UsersControllerTest: test_returns_401_when_invalid_token
1780
+ --------------------------------------------------------
1781
+  (0.1ms) SAVEPOINT active_record_1
1782
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 03:49:54.676778"], ["updated_at", "2014-12-03 03:49:54.676778"]]
1783
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '78d165f2348d4d9d1ab45c7b7b714903' LIMIT 1
1784
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "78d165f2348d4d9d1ab45c7b7b714903"], ["created_at", "2014-12-03 03:49:54.677675"], ["expired_at", "2014-12-03 06:49:54.678360"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1785
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1786
+ Processing by UsersController#index as HTML
1787
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1788
+ Completed 500 Internal Server Error in 1ms
1789
+  (0.5ms) rollback transaction
1790
+  (0.1ms) begin transaction
1791
+ ---------------------------------------------------------
1792
+ UsersControllerTest: test_returns_401_when_not_authorized
1793
+ ---------------------------------------------------------
1794
+ Processing by UsersController#index as JSON
1795
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1796
+ Completed 401 Unauthorized in 4ms (Views: 4.1ms | ActiveRecord: 0.0ms)
1797
+  (0.1ms) rollback transaction
1798
+  (0.0ms) begin transaction
1799
+ -----------------------------------------------------------
1800
+ UsersControllerTest: test_returns_401_when_token_is_expired
1801
+ -----------------------------------------------------------
1802
+  (0.0ms) rollback transaction
1803
+  (0.0ms) begin transaction
1804
+ ---------------------------------------------------------
1805
+ UsersControllerTest: test_returns_success_when_authorized
1806
+ ---------------------------------------------------------
1807
+  (0.0ms) SAVEPOINT active_record_1
1808
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 03:49:54.692586"], ["updated_at", "2014-12-03 03:49:54.692586"]]
1809
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '73c87bc99590d71b147044eea0996328' LIMIT 1
1810
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "73c87bc99590d71b147044eea0996328"], ["created_at", "2014-12-03 03:49:54.693499"], ["expired_at", "2014-12-03 06:49:54.694112"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1811
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1812
+ Processing by UsersController#index as HTML
1813
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1814
+ Completed 500 Internal Server Error in 1ms
1815
+  (0.5ms) rollback transaction
1816
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1817
+  (0.1ms) begin transaction
1818
+ ---------------------------------
1819
+ UserTest: test_ensures_an_api_key
1820
+ ---------------------------------
1821
+  (0.0ms) SAVEPOINT active_record_1
1822
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 03:50:27.416927"], ["updated_at", "2014-12-03 03:50:27.416927"]]
1823
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '5fb4d08af4b1fdacd850ae24e066531c' LIMIT 1
1824
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "5fb4d08af4b1fdacd850ae24e066531c"], ["created_at", "2014-12-03 03:50:27.421090"], ["expired_at", "2014-12-03 06:50:27.426961"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1825
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1826
+  (0.4ms) rollback transaction
1827
+  (0.0ms) begin transaction
1828
+ ---------------------------------------------------------------
1829
+ SimpleTokenAuthTest: test_sets_generate_authentication_strategy
1830
+ ---------------------------------------------------------------
1831
+  (0.0ms) rollback transaction
1832
+  (0.0ms) begin transaction
1833
+ --------------------------------------------------------
1834
+ UsersControllerTest: test_returns_401_when_invalid_token
1835
+ --------------------------------------------------------
1836
+  (0.1ms) SAVEPOINT active_record_1
1837
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 03:50:27.462335"], ["updated_at", "2014-12-03 03:50:27.462335"]]
1838
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '1f341888ae437e64053094622cc94502' LIMIT 1
1839
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "1f341888ae437e64053094622cc94502"], ["created_at", "2014-12-03 03:50:27.463230"], ["expired_at", "2014-12-03 06:50:27.463843"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1840
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1841
+ Processing by UsersController#index as HTML
1842
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1843
+ ApiKey Load (0.1ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1844
+ Rendered text template (0.0ms)
1845
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1846
+ Completed 401 Unauthorized in 5ms (Views: 3.3ms | ActiveRecord: 0.2ms)
1847
+  (0.5ms) rollback transaction
1848
+  (0.1ms) begin transaction
1849
+ ---------------------------------------------------------
1850
+ UsersControllerTest: test_returns_401_when_not_authorized
1851
+ ---------------------------------------------------------
1852
+ Processing by UsersController#index as JSON
1853
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1854
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
1855
+  (0.0ms) rollback transaction
1856
+  (0.0ms) begin transaction
1857
+ -----------------------------------------------------------
1858
+ UsersControllerTest: test_returns_401_when_token_is_expired
1859
+ -----------------------------------------------------------
1860
+  (0.0ms) rollback transaction
1861
+  (0.0ms) begin transaction
1862
+ ---------------------------------------------------------
1863
+ UsersControllerTest: test_returns_success_when_authorized
1864
+ ---------------------------------------------------------
1865
+  (0.0ms) SAVEPOINT active_record_1
1866
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 03:50:27.477396"], ["updated_at", "2014-12-03 03:50:27.477396"]]
1867
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '2a285c7f05ec984118da630852488eb3' LIMIT 1
1868
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "2a285c7f05ec984118da630852488eb3"], ["created_at", "2014-12-03 03:50:27.478971"], ["expired_at", "2014-12-03 06:50:27.480178"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1869
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1870
+ Processing by UsersController#index as HTML
1871
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1872
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1873
+ User Load (0.1ms) SELECT "users".* FROM "users"
1874
+ Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.2ms)
1875
+  (0.5ms) rollback transaction
1876
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1877
+  (0.1ms) begin transaction
1878
+ ---------------------------------------------------------------
1879
+ SimpleTokenAuthTest: test_sets_generate_authentication_strategy
1880
+ ---------------------------------------------------------------
1881
+  (0.0ms) rollback transaction
1882
+  (0.0ms) begin transaction
1883
+ ---------------------------------
1884
+ UserTest: test_ensures_an_api_key
1885
+ ---------------------------------
1886
+  (0.0ms) SAVEPOINT active_record_1
1887
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 03:52:48.590696"], ["updated_at", "2014-12-03 03:52:48.590696"]]
1888
+ ApiKey Exists (0.2ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '99bd4b77821abd577e4ee40ba5035eaf' LIMIT 1
1889
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "99bd4b77821abd577e4ee40ba5035eaf"], ["created_at", "2014-12-03 03:52:48.595882"], ["expired_at", "2014-12-03 06:52:48.603379"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1890
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1891
+  (0.5ms) rollback transaction
1892
+  (0.0ms) begin transaction
1893
+ --------------------------------------------------------
1894
+ UsersControllerTest: test_returns_401_when_invalid_token
1895
+ --------------------------------------------------------
1896
+  (0.1ms) SAVEPOINT active_record_1
1897
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 03:52:48.635537"], ["updated_at", "2014-12-03 03:52:48.635537"]]
1898
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'e0fe93e872ca89cfcea6be88be312833' LIMIT 1
1899
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "e0fe93e872ca89cfcea6be88be312833"], ["created_at", "2014-12-03 03:52:48.636531"], ["expired_at", "2014-12-03 06:52:48.637221"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1900
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1901
+ Processing by UsersController#index as HTML
1902
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1903
+ ApiKey Load (0.1ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1904
+ Rendered text template (0.0ms)
1905
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1906
+ Completed 401 Unauthorized in 5ms (Views: 3.5ms | ActiveRecord: 0.2ms)
1907
+  (1.7ms) rollback transaction
1908
+  (0.1ms) begin transaction
1909
+ ---------------------------------------------------------
1910
+ UsersControllerTest: test_returns_401_when_not_authorized
1911
+ ---------------------------------------------------------
1912
+ Processing by UsersController#index as JSON
1913
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1914
+ Completed 401 Unauthorized in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
1915
+  (0.1ms) rollback transaction
1916
+  (0.0ms) begin transaction
1917
+ -----------------------------------------------------------
1918
+ UsersControllerTest: test_returns_401_when_token_is_expired
1919
+ -----------------------------------------------------------
1920
+  (0.0ms) SAVEPOINT active_record_1
1921
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 03:52:48.654299"], ["updated_at", "2014-12-03 03:52:48.654299"]]
1922
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'b60c31d7662df56ea9d4ca251c147b1f' LIMIT 1
1923
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "b60c31d7662df56ea9d4ca251c147b1f"], ["created_at", "2014-12-03 03:52:48.655561"], ["expired_at", "2014-12-03 06:52:48.656313"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1924
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1925
+  (0.5ms) rollback transaction
1926
+  (0.0ms) begin transaction
1927
+ ---------------------------------------------------------
1928
+ UsersControllerTest: test_returns_success_when_authorized
1929
+ ---------------------------------------------------------
1930
+  (0.0ms) SAVEPOINT active_record_1
1931
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 03:52:48.691311"], ["updated_at", "2014-12-03 03:52:48.691311"]]
1932
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '3d8c15d413c7b0e0a9cc8d5182578841' LIMIT 1
1933
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "3d8c15d413c7b0e0a9cc8d5182578841"], ["created_at", "2014-12-03 03:52:48.692268"], ["expired_at", "2014-12-03 06:52:48.692936"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1934
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1935
+ Processing by UsersController#index as HTML
1936
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1937
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1938
+ User Load (0.1ms) SELECT "users".* FROM "users"
1939
+ Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.2ms)
1940
+  (0.4ms) rollback transaction
1941
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1942
+  (0.1ms) begin transaction
1943
+ ---------------------------------
1944
+ UserTest: test_ensures_an_api_key
1945
+ ---------------------------------
1946
+  (0.0ms) SAVEPOINT active_record_1
1947
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 03:58:10.568688"], ["updated_at", "2014-12-03 03:58:10.568688"]]
1948
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '63b05848cff9bfdb2bd098ef6326aa22' LIMIT 1
1949
+ SQL (0.2ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "63b05848cff9bfdb2bd098ef6326aa22"], ["created_at", "2014-12-03 03:58:10.573506"], ["expired_at", "2014-12-03 06:58:10.579745"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1950
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1951
+  (0.5ms) rollback transaction
1952
+  (0.1ms) begin transaction
1953
+ ---------------------------------------------------------------
1954
+ SimpleTokenAuthTest: test_sets_generate_authentication_strategy
1955
+ ---------------------------------------------------------------
1956
+  (0.0ms) rollback transaction
1957
+  (0.1ms) begin transaction
1958
+ --------------------------------------------------------
1959
+ UsersControllerTest: test_returns_401_when_invalid_token
1960
+ --------------------------------------------------------
1961
+  (0.1ms) SAVEPOINT active_record_1
1962
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 03:58:10.610124"], ["updated_at", "2014-12-03 03:58:10.610124"]]
1963
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '5b72bd9da17016080d68615697c1137c' LIMIT 1
1964
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "5b72bd9da17016080d68615697c1137c"], ["created_at", "2014-12-03 03:58:10.611016"], ["expired_at", "2014-12-03 06:58:10.611648"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1965
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1966
+ Processing by UsersController#index as HTML
1967
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1968
+ ApiKey Load (0.1ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1969
+ Rendered text template (0.0ms)
1970
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1971
+ Completed 401 Unauthorized in 39ms (Views: 37.8ms | ActiveRecord: 0.2ms)
1972
+  (0.5ms) rollback transaction
1973
+  (0.1ms) begin transaction
1974
+ ---------------------------------------------------------
1975
+ UsersControllerTest: test_returns_401_when_not_authorized
1976
+ ---------------------------------------------------------
1977
+ Processing by UsersController#index as JSON
1978
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
1979
+ Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
1980
+  (0.1ms) rollback transaction
1981
+  (0.0ms) begin transaction
1982
+ -----------------------------------------------------------
1983
+ UsersControllerTest: test_returns_401_when_token_is_expired
1984
+ -----------------------------------------------------------
1985
+  (0.0ms) SAVEPOINT active_record_1
1986
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 03:58:10.660460"], ["updated_at", "2014-12-03 03:58:10.660460"]]
1987
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'e825257d430c93654babe79e1c80f991' LIMIT 1
1988
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "e825257d430c93654babe79e1c80f991"], ["created_at", "2014-12-03 03:58:10.661664"], ["expired_at", "2014-12-03 06:58:10.662481"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1989
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1990
+ Processing by UsersController#index as HTML
1991
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
1992
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
1993
+ User Load (0.0ms) SELECT "users".* FROM "users"
1994
+ Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)
1995
+  (0.5ms) rollback transaction
1996
+  (0.0ms) begin transaction
1997
+ ---------------------------------------------------------
1998
+ UsersControllerTest: test_returns_success_when_authorized
1999
+ ---------------------------------------------------------
2000
+  (0.0ms) SAVEPOINT active_record_1
2001
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 03:58:10.668693"], ["updated_at", "2014-12-03 03:58:10.668693"]]
2002
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '8dd04c6bf004c6a1d5d33b93dda9108e' LIMIT 1
2003
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "8dd04c6bf004c6a1d5d33b93dda9108e"], ["created_at", "2014-12-03 03:58:10.669556"], ["expired_at", "2014-12-03 06:58:10.670217"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2004
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2005
+ Processing by UsersController#index as HTML
2006
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2007
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2008
+ User Load (0.1ms) SELECT "users".* FROM "users"
2009
+ Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms)
2010
+  (0.4ms) rollback transaction
2011
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2012
+  (0.1ms) begin transaction
2013
+ ---------------------------------
2014
+ UserTest: test_ensures_an_api_key
2015
+ ---------------------------------
2016
+  (0.0ms) SAVEPOINT active_record_1
2017
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:09:15.806492"], ["updated_at", "2014-12-03 04:09:15.806492"]]
2018
+ ApiKey Exists (0.2ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '77df732145f9bae0b6155e81b0318563' LIMIT 1
2019
+ SQL (0.2ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "77df732145f9bae0b6155e81b0318563"], ["created_at", "2014-12-03 04:09:15.810615"], ["expired_at", "2014-12-03 07:09:15.817142"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2020
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2021
+  (0.5ms) rollback transaction
2022
+  (0.0ms) begin transaction
2023
+ ---------------------------------------------------------------
2024
+ SimpleTokenAuthTest: test_sets_generate_authentication_strategy
2025
+ ---------------------------------------------------------------
2026
+  (0.0ms) rollback transaction
2027
+  (0.1ms) begin transaction
2028
+ --------------------------------------------------------
2029
+ UsersControllerTest: test_returns_401_when_invalid_token
2030
+ --------------------------------------------------------
2031
+  (0.1ms) SAVEPOINT active_record_1
2032
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:09:15.848849"], ["updated_at", "2014-12-03 04:09:15.848849"]]
2033
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '57fc2842c723f3cfe756aedf29f1683b' LIMIT 1
2034
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "57fc2842c723f3cfe756aedf29f1683b"], ["created_at", "2014-12-03 04:09:15.849744"], ["expired_at", "2014-12-03 07:09:15.850361"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2035
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2036
+ Processing by UsersController#index as HTML
2037
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2038
+ ApiKey Load (0.1ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2039
+ Completed 500 Internal Server Error in 2ms
2040
+  (0.5ms) rollback transaction
2041
+  (0.1ms) begin transaction
2042
+ ---------------------------------------------------------
2043
+ UsersControllerTest: test_returns_401_when_not_authorized
2044
+ ---------------------------------------------------------
2045
+ Processing by UsersController#index as JSON
2046
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2047
+ Completed 401 Unauthorized in 38ms (Views: 37.8ms | ActiveRecord: 0.0ms)
2048
+  (0.1ms) rollback transaction
2049
+  (0.0ms) begin transaction
2050
+ -----------------------------------------------------------
2051
+ UsersControllerTest: test_returns_401_when_token_is_expired
2052
+ -----------------------------------------------------------
2053
+  (0.0ms) SAVEPOINT active_record_1
2054
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:09:15.898848"], ["updated_at", "2014-12-03 04:09:15.898848"]]
2055
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '686424c4a681c4557ba5e5fb4910857c' LIMIT 1
2056
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "686424c4a681c4557ba5e5fb4910857c"], ["created_at", "2014-12-03 04:09:15.899847"], ["expired_at", "2014-12-03 07:09:15.900536"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2057
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2058
+ Processing by UsersController#index as HTML
2059
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2060
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2061
+ Completed 500 Internal Server Error in 0ms
2062
+  (0.4ms) rollback transaction
2063
+  (0.1ms) begin transaction
2064
+ ---------------------------------------------------------
2065
+ UsersControllerTest: test_returns_success_when_authorized
2066
+ ---------------------------------------------------------
2067
+  (0.0ms) SAVEPOINT active_record_1
2068
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:09:15.905771"], ["updated_at", "2014-12-03 04:09:15.905771"]]
2069
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '1379285dee5ade040b754c9c2e7942d7' LIMIT 1
2070
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "1379285dee5ade040b754c9c2e7942d7"], ["created_at", "2014-12-03 04:09:15.906505"], ["expired_at", "2014-12-03 07:09:15.907049"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2071
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2072
+ Processing by UsersController#index as HTML
2073
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2074
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2075
+ Completed 500 Internal Server Error in 1ms
2076
+  (0.4ms) rollback transaction
2077
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2078
+  (0.1ms) begin transaction
2079
+ ---------------------------------
2080
+ UserTest: test_ensures_an_api_key
2081
+ ---------------------------------
2082
+  (0.0ms) SAVEPOINT active_record_1
2083
+ SQL (0.8ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:10:09.985586"], ["updated_at", "2014-12-03 04:10:09.985586"]]
2084
+ ApiKey Exists (0.2ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '59844ac06262b01108676ce412aedc9e' LIMIT 1
2085
+ SQL (0.2ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "59844ac06262b01108676ce412aedc9e"], ["created_at", "2014-12-03 04:10:09.990403"], ["expired_at", "2014-12-03 07:10:09.998528"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2086
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2087
+  (0.6ms) rollback transaction
2088
+  (0.1ms) begin transaction
2089
+ ---------------------------------------------------------------
2090
+ SimpleTokenAuthTest: test_sets_generate_authentication_strategy
2091
+ ---------------------------------------------------------------
2092
+  (0.0ms) rollback transaction
2093
+  (0.1ms) begin transaction
2094
+ --------------------------------------------------------
2095
+ UsersControllerTest: test_returns_401_when_invalid_token
2096
+ --------------------------------------------------------
2097
+  (0.1ms) SAVEPOINT active_record_1
2098
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:10:10.031073"], ["updated_at", "2014-12-03 04:10:10.031073"]]
2099
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '435cf2dc42f905232c935a06ea380da3' LIMIT 1
2100
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "435cf2dc42f905232c935a06ea380da3"], ["created_at", "2014-12-03 04:10:10.031980"], ["expired_at", "2014-12-03 07:10:10.032607"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2101
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2102
+ Processing by UsersController#index as HTML
2103
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2104
+ ApiKey Load (0.1ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2105
+ Rendered text template (0.0ms)
2106
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2107
+ Completed 401 Unauthorized in 36ms (Views: 34.5ms | ActiveRecord: 0.2ms)
2108
+  (0.6ms) rollback transaction
2109
+  (0.0ms) begin transaction
2110
+ ---------------------------------------------------------
2111
+ UsersControllerTest: test_returns_401_when_not_authorized
2112
+ ---------------------------------------------------------
2113
+ Processing by UsersController#index as JSON
2114
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2115
+ Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2116
+  (0.1ms) rollback transaction
2117
+  (0.0ms) begin transaction
2118
+ -----------------------------------------------------------
2119
+ UsersControllerTest: test_returns_401_when_token_is_expired
2120
+ -----------------------------------------------------------
2121
+  (0.0ms) SAVEPOINT active_record_1
2122
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:10:10.078249"], ["updated_at", "2014-12-03 04:10:10.078249"]]
2123
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '94ca245eb7592167c6651a91dda931b4' LIMIT 1
2124
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "94ca245eb7592167c6651a91dda931b4"], ["created_at", "2014-12-03 04:10:10.079460"], ["expired_at", "2014-12-03 07:10:10.080291"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2125
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2126
+ Processing by UsersController#index as HTML
2127
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2128
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2129
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2130
+ Completed 401 Unauthorized in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)
2131
+  (0.5ms) rollback transaction
2132
+  (0.0ms) begin transaction
2133
+ ---------------------------------------------------------
2134
+ UsersControllerTest: test_returns_success_when_authorized
2135
+ ---------------------------------------------------------
2136
+  (0.0ms) SAVEPOINT active_record_1
2137
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:10:10.086271"], ["updated_at", "2014-12-03 04:10:10.086271"]]
2138
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '0882627fc79786152f9f46d65cf435d5' LIMIT 1
2139
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "0882627fc79786152f9f46d65cf435d5"], ["created_at", "2014-12-03 04:10:10.087147"], ["expired_at", "2014-12-03 07:10:10.087809"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2140
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2141
+ Processing by UsersController#index as HTML
2142
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2143
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2144
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2145
+ Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)
2146
+  (0.4ms) rollback transaction
2147
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2148
+  (0.1ms) begin transaction
2149
+ --------------------------------------------------------
2150
+ UsersControllerTest: test_returns_401_when_invalid_token
2151
+ --------------------------------------------------------
2152
+  (0.0ms) SAVEPOINT active_record_1
2153
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:11:06.883826"], ["updated_at", "2014-12-03 04:11:06.883826"]]
2154
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '3471d14fe3e4349b9954c0be928c8846' LIMIT 1
2155
+ SQL (0.2ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "3471d14fe3e4349b9954c0be928c8846"], ["created_at", "2014-12-03 04:11:06.888305"], ["expired_at", "2014-12-03 07:11:06.894610"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2156
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2157
+ Processing by UsersController#index as HTML
2158
+ User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2159
+ ApiKey Load (0.1ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2160
+ Rendered text template (0.0ms)
2161
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2162
+ Completed 401 Unauthorized in 39ms (Views: 36.8ms | ActiveRecord: 0.3ms)
2163
+  (0.5ms) rollback transaction
2164
+  (0.0ms) begin transaction
2165
+ ---------------------------------------------------------
2166
+ UsersControllerTest: test_returns_401_when_not_authorized
2167
+ ---------------------------------------------------------
2168
+ Processing by UsersController#index as JSON
2169
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2170
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
2171
+  (0.0ms) rollback transaction
2172
+  (0.0ms) begin transaction
2173
+ -----------------------------------------------------------
2174
+ UsersControllerTest: test_returns_401_when_token_is_expired
2175
+ -----------------------------------------------------------
2176
+  (0.0ms) SAVEPOINT active_record_1
2177
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:11:06.941887"], ["updated_at", "2014-12-03 04:11:06.941887"]]
2178
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'ff0a288c1804ac6fab95d85e0fa68508' LIMIT 1
2179
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "ff0a288c1804ac6fab95d85e0fa68508"], ["created_at", "2014-12-03 04:11:06.942844"], ["expired_at", "2014-12-03 07:11:06.943525"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2180
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2181
+ Processing by UsersController#index as HTML
2182
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2183
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2184
+ User Load (0.0ms) SELECT "users".* FROM "users"
2185
+ Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)
2186
+  (0.5ms) rollback transaction
2187
+  (0.0ms) begin transaction
2188
+ ---------------------------------------------------------
2189
+ UsersControllerTest: test_returns_success_when_authorized
2190
+ ---------------------------------------------------------
2191
+  (0.0ms) SAVEPOINT active_record_1
2192
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:11:06.949299"], ["updated_at", "2014-12-03 04:11:06.949299"]]
2193
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'f8763dacd2ba5438e20fe5111ec0d225' LIMIT 1
2194
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "f8763dacd2ba5438e20fe5111ec0d225"], ["created_at", "2014-12-03 04:11:06.950105"], ["expired_at", "2014-12-03 07:11:06.950710"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2195
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2196
+ Processing by UsersController#index as HTML
2197
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2198
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2199
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2200
+ Completed 401 Unauthorized in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)
2201
+  (0.6ms) rollback transaction
2202
+  (0.1ms) begin transaction
2203
+ ---------------------------------------------------------------
2204
+ SimpleTokenAuthTest: test_sets_generate_authentication_strategy
2205
+ ---------------------------------------------------------------
2206
+  (0.1ms) rollback transaction
2207
+  (0.1ms) begin transaction
2208
+ ---------------------------------
2209
+ UserTest: test_ensures_an_api_key
2210
+ ---------------------------------
2211
+  (0.0ms) SAVEPOINT active_record_1
2212
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:11:06.959689"], ["updated_at", "2014-12-03 04:11:06.959689"]]
2213
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'a876ef5694526371cf1e6486ed110865' LIMIT 1
2214
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "a876ef5694526371cf1e6486ed110865"], ["created_at", "2014-12-03 04:11:06.960718"], ["expired_at", "2014-12-03 07:11:06.961362"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2215
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2216
+  (0.4ms) rollback transaction
2217
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2218
+  (0.1ms) begin transaction
2219
+ ---------------------------------
2220
+ UserTest: test_ensures_an_api_key
2221
+ ---------------------------------
2222
+  (0.0ms) SAVEPOINT active_record_1
2223
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:12:48.762196"], ["updated_at", "2014-12-03 04:12:48.762196"]]
2224
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '1177a43b68539ea6aa8ba22651234f9c' LIMIT 1
2225
+ SQL (0.2ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "1177a43b68539ea6aa8ba22651234f9c"], ["created_at", "2014-12-03 04:12:48.766368"], ["expired_at", "2014-12-03 07:12:48.771970"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2226
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2227
+  (0.5ms) rollback transaction
2228
+  (0.1ms) begin transaction
2229
+ --------------------------------------------------------
2230
+ UsersControllerTest: test_returns_401_when_invalid_token
2231
+ --------------------------------------------------------
2232
+  (0.1ms) SAVEPOINT active_record_1
2233
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:12:48.804546"], ["updated_at", "2014-12-03 04:12:48.804546"]]
2234
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'beba39b4d208f459b0b75e5f804967f6' LIMIT 1
2235
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "beba39b4d208f459b0b75e5f804967f6"], ["created_at", "2014-12-03 04:12:48.805447"], ["expired_at", "2014-12-03 07:12:48.806080"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2236
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2237
+ Processing by UsersController#index as HTML
2238
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2239
+ ApiKey Load (0.1ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2240
+ Rendered text template (0.0ms)
2241
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2242
+ Completed 401 Unauthorized in 38ms (Views: 36.4ms | ActiveRecord: 0.2ms)
2243
+  (0.6ms) rollback transaction
2244
+  (0.1ms) begin transaction
2245
+ ---------------------------------------------------------
2246
+ UsersControllerTest: test_returns_401_when_not_authorized
2247
+ ---------------------------------------------------------
2248
+ Processing by UsersController#index as JSON
2249
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2250
+ Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2251
+  (0.1ms) rollback transaction
2252
+  (0.0ms) begin transaction
2253
+ -----------------------------------------------------------
2254
+ UsersControllerTest: test_returns_401_when_token_is_expired
2255
+ -----------------------------------------------------------
2256
+  (0.0ms) SAVEPOINT active_record_1
2257
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:12:48.853514"], ["updated_at", "2014-12-03 04:12:48.853514"]]
2258
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '5a0fac9e41067cb6cf0a550fba035c52' LIMIT 1
2259
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "5a0fac9e41067cb6cf0a550fba035c52"], ["created_at", "2014-12-03 04:12:48.854716"], ["expired_at", "2014-12-03 07:12:48.855532"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2260
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2261
+ Processing by UsersController#index as HTML
2262
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2263
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2264
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2265
+ Completed 401 Unauthorized in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)
2266
+  (0.5ms) rollback transaction
2267
+  (0.0ms) begin transaction
2268
+ ---------------------------------------------------------
2269
+ UsersControllerTest: test_returns_success_when_authorized
2270
+ ---------------------------------------------------------
2271
+  (0.0ms) SAVEPOINT active_record_1
2272
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:12:48.861428"], ["updated_at", "2014-12-03 04:12:48.861428"]]
2273
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'f4f959ae0359c8398bc4f6e2e224668a' LIMIT 1
2274
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "f4f959ae0359c8398bc4f6e2e224668a"], ["created_at", "2014-12-03 04:12:48.862290"], ["expired_at", "2014-12-03 07:12:48.862929"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2275
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2276
+ Processing by UsersController#index as HTML
2277
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2278
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2279
+ User Load (0.1ms) SELECT "users".* FROM "users"
2280
+ Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms)
2281
+  (0.4ms) rollback transaction
2282
+  (0.0ms) begin transaction
2283
+ ---------------------------------------------------------------
2284
+ SimpleTokenAuthTest: test_sets_generate_authentication_strategy
2285
+ ---------------------------------------------------------------
2286
+  (0.0ms) rollback transaction
2287
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2288
+  (0.1ms) begin transaction
2289
+ ---------------------------------
2290
+ UserTest: test_ensures_an_api_key
2291
+ ---------------------------------
2292
+  (0.0ms) SAVEPOINT active_record_1
2293
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:33:57.495733"], ["updated_at", "2014-12-03 04:33:57.495733"]]
2294
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'fea463c58f828f273482b7e381566fc1' LIMIT 1
2295
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "fea463c58f828f273482b7e381566fc1"], ["created_at", "2014-12-03 04:33:57.499676"], ["expired_at", "2014-12-03 07:33:57.505280"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2296
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2297
+  (0.7ms) rollback transaction
2298
+  (0.1ms) begin transaction
2299
+ -------------------------------
2300
+ UserTest: test_renew_an_api_key
2301
+ -------------------------------
2302
+  (0.1ms) SAVEPOINT active_record_1
2303
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:33:57.509424"], ["updated_at", "2014-12-03 04:33:57.509424"]]
2304
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '1dbed2cf47bd3fd59d883d15ca49e6a0' LIMIT 1
2305
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "1dbed2cf47bd3fd59d883d15ca49e6a0"], ["created_at", "2014-12-03 04:33:57.510682"], ["expired_at", "2014-12-03 07:33:57.511567"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2306
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2307
+  (0.5ms) rollback transaction
2308
+  (0.0ms) begin transaction
2309
+ --------------------------------------------------------
2310
+ UsersControllerTest: test_returns_401_when_invalid_token
2311
+ --------------------------------------------------------
2312
+  (0.1ms) SAVEPOINT active_record_1
2313
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:33:57.541546"], ["updated_at", "2014-12-03 04:33:57.541546"]]
2314
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '381cd7105c81970ef9ac62ddb38e1387' LIMIT 1
2315
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "381cd7105c81970ef9ac62ddb38e1387"], ["created_at", "2014-12-03 04:33:57.542568"], ["expired_at", "2014-12-03 07:33:57.543246"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2316
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2317
+ Processing by UsersController#index as HTML
2318
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2319
+ ApiKey Load (0.1ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2320
+ Rendered text template (0.0ms)
2321
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2322
+ Completed 401 Unauthorized in 39ms (Views: 37.5ms | ActiveRecord: 0.2ms)
2323
+  (0.4ms) rollback transaction
2324
+  (0.0ms) begin transaction
2325
+ ---------------------------------------------------------
2326
+ UsersControllerTest: test_returns_401_when_not_authorized
2327
+ ---------------------------------------------------------
2328
+ Processing by UsersController#index as JSON
2329
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2330
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
2331
+  (0.0ms) rollback transaction
2332
+  (0.0ms) begin transaction
2333
+ -----------------------------------------------------------
2334
+ UsersControllerTest: test_returns_401_when_token_is_expired
2335
+ -----------------------------------------------------------
2336
+  (0.0ms) SAVEPOINT active_record_1
2337
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:33:57.590311"], ["updated_at", "2014-12-03 04:33:57.590311"]]
2338
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'a1b30f8db595c2de42535cea6ec58509' LIMIT 1
2339
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "a1b30f8db595c2de42535cea6ec58509"], ["created_at", "2014-12-03 04:33:57.591223"], ["expired_at", "2014-12-03 07:33:57.591839"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2340
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2341
+ Processing by UsersController#index as HTML
2342
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2343
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2344
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2345
+ Completed 401 Unauthorized in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)
2346
+  (0.6ms) rollback transaction
2347
+  (0.1ms) begin transaction
2348
+ ---------------------------------------------------------
2349
+ UsersControllerTest: test_returns_success_when_authorized
2350
+ ---------------------------------------------------------
2351
+  (0.1ms) SAVEPOINT active_record_1
2352
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:33:57.598181"], ["updated_at", "2014-12-03 04:33:57.598181"]]
2353
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '1b7ac358c4bb6ccac815c6d826b9da49' LIMIT 1
2354
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "1b7ac358c4bb6ccac815c6d826b9da49"], ["created_at", "2014-12-03 04:33:57.599428"], ["expired_at", "2014-12-03 07:33:57.600366"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2355
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2356
+ Processing by UsersController#index as HTML
2357
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2358
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2359
+ User Load (0.1ms) SELECT "users".* FROM "users"
2360
+ Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.2ms)
2361
+  (0.5ms) rollback transaction
2362
+  (0.0ms) begin transaction
2363
+ ---------------------------------------------------------------
2364
+ SimpleTokenAuthTest: test_sets_generate_authentication_strategy
2365
+ ---------------------------------------------------------------
2366
+  (0.0ms) rollback transaction
2367
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2368
+  (0.1ms) begin transaction
2369
+ ---------------------------------
2370
+ UserTest: test_ensures_an_api_key
2371
+ ---------------------------------
2372
+  (0.0ms) SAVEPOINT active_record_1
2373
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:34:15.518787"], ["updated_at", "2014-12-03 04:34:15.518787"]]
2374
+ ApiKey Exists (0.2ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '3533ae7aaef8326509725f02a1c93a36' LIMIT 1
2375
+ SQL (0.2ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "3533ae7aaef8326509725f02a1c93a36"], ["created_at", "2014-12-03 04:34:15.523264"], ["expired_at", "2014-12-03 07:34:15.531459"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2376
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2377
+  (0.6ms) rollback transaction
2378
+  (0.0ms) begin transaction
2379
+ -------------------------------
2380
+ UserTest: test_renew_an_api_key
2381
+ -------------------------------
2382
+  (0.0ms) SAVEPOINT active_record_1
2383
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:34:15.535118"], ["updated_at", "2014-12-03 04:34:15.535118"]]
2384
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '0b00a4b90c454a642666fcf1063639df' LIMIT 1
2385
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "0b00a4b90c454a642666fcf1063639df"], ["created_at", "2014-12-03 04:34:15.535874"], ["expired_at", "2014-12-03 07:34:15.536445"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2386
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2387
+  (15.2ms) rollback transaction
2388
+  (0.1ms) begin transaction
2389
+ --------------------------------------------------------
2390
+ UsersControllerTest: test_returns_401_when_invalid_token
2391
+ --------------------------------------------------------
2392
+  (0.1ms) SAVEPOINT active_record_1
2393
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:34:15.586141"], ["updated_at", "2014-12-03 04:34:15.586141"]]
2394
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'a68be1e8ea0c2c995748b7c302fb0476' LIMIT 1
2395
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "a68be1e8ea0c2c995748b7c302fb0476"], ["created_at", "2014-12-03 04:34:15.587089"], ["expired_at", "2014-12-03 07:34:15.587736"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2396
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2397
+ Processing by UsersController#index as HTML
2398
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2399
+ ApiKey Load (0.1ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2400
+ Rendered text template (0.0ms)
2401
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2402
+ Completed 401 Unauthorized in 40ms (Views: 38.7ms | ActiveRecord: 0.2ms)
2403
+  (0.5ms) rollback transaction
2404
+  (0.0ms) begin transaction
2405
+ ---------------------------------------------------------
2406
+ UsersControllerTest: test_returns_401_when_not_authorized
2407
+ ---------------------------------------------------------
2408
+ Processing by UsersController#index as JSON
2409
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2410
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
2411
+  (0.0ms) rollback transaction
2412
+  (0.0ms) begin transaction
2413
+ -----------------------------------------------------------
2414
+ UsersControllerTest: test_returns_401_when_token_is_expired
2415
+ -----------------------------------------------------------
2416
+  (0.0ms) SAVEPOINT active_record_1
2417
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:34:15.635841"], ["updated_at", "2014-12-03 04:34:15.635841"]]
2418
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '47f673458af2f2c26ae8e866f58feb47' LIMIT 1
2419
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "47f673458af2f2c26ae8e866f58feb47"], ["created_at", "2014-12-03 04:34:15.636811"], ["expired_at", "2014-12-03 07:34:15.637519"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2420
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2421
+ Processing by UsersController#index as HTML
2422
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2423
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2424
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2425
+ Completed 401 Unauthorized in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)
2426
+  (0.5ms) rollback transaction
2427
+  (0.0ms) begin transaction
2428
+ ---------------------------------------------------------
2429
+ UsersControllerTest: test_returns_success_when_authorized
2430
+ ---------------------------------------------------------
2431
+  (0.0ms) SAVEPOINT active_record_1
2432
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:34:15.643320"], ["updated_at", "2014-12-03 04:34:15.643320"]]
2433
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '15aadb35a115646d860ffc9ec379979f' LIMIT 1
2434
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "15aadb35a115646d860ffc9ec379979f"], ["created_at", "2014-12-03 04:34:15.644175"], ["expired_at", "2014-12-03 07:34:15.644792"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2435
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2436
+ Processing by UsersController#index as HTML
2437
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2438
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2439
+ User Load (0.1ms) SELECT "users".* FROM "users"
2440
+ Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms)
2441
+  (0.5ms) rollback transaction
2442
+  (0.1ms) begin transaction
2443
+ ---------------------------------------------------------------
2444
+ SimpleTokenAuthTest: test_sets_generate_authentication_strategy
2445
+ ---------------------------------------------------------------
2446
+  (0.1ms) rollback transaction
2447
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2448
+  (0.1ms) begin transaction
2449
+ ---------------------------------
2450
+ UserTest: test_ensures_an_api_key
2451
+ ---------------------------------
2452
+  (0.0ms) SAVEPOINT active_record_1
2453
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:35:25.466448"], ["updated_at", "2014-12-03 04:35:25.466448"]]
2454
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'fc9dfd7a2e329df84c436c8bfc859eeb' LIMIT 1
2455
+ SQL (0.2ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "fc9dfd7a2e329df84c436c8bfc859eeb"], ["created_at", "2014-12-03 04:35:25.470904"], ["expired_at", "2014-12-03 07:35:25.477038"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2456
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2457
+  (0.6ms) rollback transaction
2458
+  (0.1ms) begin transaction
2459
+ -------------------------------
2460
+ UserTest: test_renew_an_api_key
2461
+ -------------------------------
2462
+  (0.1ms) SAVEPOINT active_record_1
2463
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:35:25.481246"], ["updated_at", "2014-12-03 04:35:25.481246"]]
2464
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '587b26fa8bbdd9a2c9f14b6b23ba570d' LIMIT 1
2465
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "587b26fa8bbdd9a2c9f14b6b23ba570d"], ["created_at", "2014-12-03 04:35:25.482206"], ["expired_at", "2014-12-03 07:35:25.482838"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2466
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2467
+  (13.2ms) rollback transaction
2468
+  (0.1ms) begin transaction
2469
+ --------------------------------------------------------
2470
+ UsersControllerTest: test_returns_401_when_invalid_token
2471
+ --------------------------------------------------------
2472
+  (0.1ms) SAVEPOINT active_record_1
2473
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:35:25.531158"], ["updated_at", "2014-12-03 04:35:25.531158"]]
2474
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '747b5461904fe2e3ceaf318f88fce994' LIMIT 1
2475
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "747b5461904fe2e3ceaf318f88fce994"], ["created_at", "2014-12-03 04:35:25.532052"], ["expired_at", "2014-12-03 07:35:25.532662"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2476
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2477
+ Processing by UsersController#index as HTML
2478
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2479
+ ApiKey Load (0.1ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2480
+ Rendered text template (0.0ms)
2481
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2482
+ Completed 401 Unauthorized in 35ms (Views: 33.5ms | ActiveRecord: 0.2ms)
2483
+  (0.6ms) rollback transaction
2484
+  (0.1ms) begin transaction
2485
+ ---------------------------------------------------------
2486
+ UsersControllerTest: test_returns_401_when_not_authorized
2487
+ ---------------------------------------------------------
2488
+ Processing by UsersController#index as JSON
2489
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2490
+ Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2491
+  (0.1ms) rollback transaction
2492
+  (0.0ms) begin transaction
2493
+ -----------------------------------------------------------
2494
+ UsersControllerTest: test_returns_401_when_token_is_expired
2495
+ -----------------------------------------------------------
2496
+  (0.0ms) SAVEPOINT active_record_1
2497
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:35:25.577279"], ["updated_at", "2014-12-03 04:35:25.577279"]]
2498
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '6fcb11788525b347dee294d355b0d7c3' LIMIT 1
2499
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "6fcb11788525b347dee294d355b0d7c3"], ["created_at", "2014-12-03 04:35:25.578511"], ["expired_at", "2014-12-03 07:35:25.579305"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2500
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2501
+ Processing by UsersController#index as HTML
2502
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2503
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2504
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2505
+ Completed 401 Unauthorized in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)
2506
+  (0.5ms) rollback transaction
2507
+  (0.0ms) begin transaction
2508
+ ---------------------------------------------------------
2509
+ UsersControllerTest: test_returns_success_when_authorized
2510
+ ---------------------------------------------------------
2511
+  (0.0ms) SAVEPOINT active_record_1
2512
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:35:25.585348"], ["updated_at", "2014-12-03 04:35:25.585348"]]
2513
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'a965a8619a97803bf7ac774c2ac0de2c' LIMIT 1
2514
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "a965a8619a97803bf7ac774c2ac0de2c"], ["created_at", "2014-12-03 04:35:25.586231"], ["expired_at", "2014-12-03 07:35:25.586874"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2515
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2516
+ Processing by UsersController#index as HTML
2517
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2518
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2519
+ User Load (0.1ms) SELECT "users".* FROM "users"
2520
+ Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms)
2521
+  (0.4ms) rollback transaction
2522
+  (0.0ms) begin transaction
2523
+ ---------------------------------------------------------------
2524
+ SimpleTokenAuthTest: test_sets_generate_authentication_strategy
2525
+ ---------------------------------------------------------------
2526
+  (0.0ms) rollback transaction
2527
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2528
+  (0.1ms) begin transaction
2529
+ ---------------------------------------------------------------
2530
+ SimpleTokenAuthTest: test_sets_generate_authentication_strategy
2531
+ ---------------------------------------------------------------
2532
+  (0.0ms) rollback transaction
2533
+  (0.0ms) begin transaction
2534
+ ---------------------------------
2535
+ UserTest: test_ensures_an_api_key
2536
+ ---------------------------------
2537
+  (0.0ms) SAVEPOINT active_record_1
2538
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:35:51.064127"], ["updated_at", "2014-12-03 04:35:51.064127"]]
2539
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'e30056ea8ecdcd299b764a9b1f461c6c' LIMIT 1
2540
+ SQL (0.2ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "e30056ea8ecdcd299b764a9b1f461c6c"], ["created_at", "2014-12-03 04:35:51.068153"], ["expired_at", "2014-12-03 07:35:51.074653"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2541
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2542
+  (0.6ms) rollback transaction
2543
+  (0.7ms) begin transaction
2544
+ -------------------------------
2545
+ UserTest: test_renew_an_api_key
2546
+ -------------------------------
2547
+  (0.0ms) SAVEPOINT active_record_1
2548
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:35:51.079074"], ["updated_at", "2014-12-03 04:35:51.079074"]]
2549
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'ffe5e8a37e7df1469660e7dd4d4290ff' LIMIT 1
2550
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "ffe5e8a37e7df1469660e7dd4d4290ff"], ["created_at", "2014-12-03 04:35:51.079973"], ["expired_at", "2014-12-03 07:35:51.080587"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2551
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2552
+ ApiKey Exists (0.0ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'b9ed0c3ead01ed5425213ebed9b21828' LIMIT 1
2553
+  (0.0ms) SAVEPOINT active_record_1
2554
+ SQL (0.0ms) UPDATE "api_keys" SET "access_token" = ?, "expired_at" = ? WHERE "api_keys"."id" = 1 [["access_token", "b9ed0c3ead01ed5425213ebed9b21828"], ["expired_at", "2014-12-03 11:35:51.081261"]]
2555
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2556
+  (0.7ms) rollback transaction
2557
+  (0.0ms) begin transaction
2558
+ --------------------------------------------------------
2559
+ UsersControllerTest: test_returns_401_when_invalid_token
2560
+ --------------------------------------------------------
2561
+  (0.1ms) SAVEPOINT active_record_1
2562
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:35:51.112352"], ["updated_at", "2014-12-03 04:35:51.112352"]]
2563
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'f9b7ad5789e85cb3a8d978e34eaeaefe' LIMIT 1
2564
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "f9b7ad5789e85cb3a8d978e34eaeaefe"], ["created_at", "2014-12-03 04:35:51.113344"], ["expired_at", "2014-12-03 07:35:51.114026"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2565
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2566
+ Processing by UsersController#index as HTML
2567
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2568
+ ApiKey Load (0.1ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2569
+ Rendered text template (0.0ms)
2570
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2571
+ Completed 401 Unauthorized in 39ms (Views: 37.0ms | ActiveRecord: 0.2ms)
2572
+  (0.6ms) rollback transaction
2573
+  (0.1ms) begin transaction
2574
+ ---------------------------------------------------------
2575
+ UsersControllerTest: test_returns_401_when_not_authorized
2576
+ ---------------------------------------------------------
2577
+ Processing by UsersController#index as JSON
2578
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2579
+ Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2580
+  (0.1ms) rollback transaction
2581
+  (0.0ms) begin transaction
2582
+ -----------------------------------------------------------
2583
+ UsersControllerTest: test_returns_401_when_token_is_expired
2584
+ -----------------------------------------------------------
2585
+  (0.0ms) SAVEPOINT active_record_1
2586
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:35:51.162448"], ["updated_at", "2014-12-03 04:35:51.162448"]]
2587
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'e58872cd8d7d96ad4957aea83893bfaf' LIMIT 1
2588
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "e58872cd8d7d96ad4957aea83893bfaf"], ["created_at", "2014-12-03 04:35:51.163651"], ["expired_at", "2014-12-03 07:35:51.164456"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2589
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2590
+ Processing by UsersController#index as HTML
2591
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2592
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2593
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2594
+ Completed 401 Unauthorized in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)
2595
+  (0.5ms) rollback transaction
2596
+  (0.0ms) begin transaction
2597
+ ---------------------------------------------------------
2598
+ UsersControllerTest: test_returns_success_when_authorized
2599
+ ---------------------------------------------------------
2600
+  (0.0ms) SAVEPOINT active_record_1
2601
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:35:51.171852"], ["updated_at", "2014-12-03 04:35:51.171852"]]
2602
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '1e7a5570adb2c64634be7ba19b5de30b' LIMIT 1
2603
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "1e7a5570adb2c64634be7ba19b5de30b"], ["created_at", "2014-12-03 04:35:51.172710"], ["expired_at", "2014-12-03 07:35:51.173347"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2604
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2605
+ Processing by UsersController#index as HTML
2606
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2607
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2608
+ User Load (0.1ms) SELECT "users".* FROM "users"
2609
+ Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms)
2610
+  (0.4ms) rollback transaction
2611
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2612
+  (0.1ms) begin transaction
2613
+ ---------------------------------
2614
+ UserTest: test_ensures_an_api_key
2615
+ ---------------------------------
2616
+  (0.0ms) SAVEPOINT active_record_1
2617
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:36:50.710443"], ["updated_at", "2014-12-03 04:36:50.710443"]]
2618
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'd0d92d74b8096e39e678a88f5bba8a74' LIMIT 1
2619
+ SQL (0.2ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "d0d92d74b8096e39e678a88f5bba8a74"], ["created_at", "2014-12-03 04:36:50.714519"], ["expired_at", "2014-12-03 07:36:50.720763"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2620
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2621
+  (0.6ms) rollback transaction
2622
+  (0.1ms) begin transaction
2623
+ -------------------------------
2624
+ UserTest: test_renew_an_api_key
2625
+ -------------------------------
2626
+  (0.1ms) SAVEPOINT active_record_1
2627
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:36:50.725290"], ["updated_at", "2014-12-03 04:36:50.725290"]]
2628
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'fc2746f14aee012d99ae76f4a262189e' LIMIT 1
2629
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "fc2746f14aee012d99ae76f4a262189e"], ["created_at", "2014-12-03 04:36:50.726502"], ["expired_at", "2014-12-03 07:36:50.727350"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2630
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2631
+ ApiKey Exists (0.0ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '0f8b557eb886d4180c2b3562d085f95e' LIMIT 1
2632
+  (0.0ms) SAVEPOINT active_record_1
2633
+ SQL (0.0ms) UPDATE "api_keys" SET "access_token" = ?, "expired_at" = ? WHERE "api_keys"."id" = 1 [["access_token", "0f8b557eb886d4180c2b3562d085f95e"], ["expired_at", "2014-12-03 11:36:50.728302"]]
2634
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2635
+  (0.6ms) rollback transaction
2636
+  (0.0ms) begin transaction
2637
+ ---------------------------------------------------------------
2638
+ SimpleTokenAuthTest: test_sets_generate_authentication_strategy
2639
+ ---------------------------------------------------------------
2640
+  (0.0ms) rollback transaction
2641
+  (0.0ms) begin transaction
2642
+ --------------------------------------------------------
2643
+ UsersControllerTest: test_returns_401_when_invalid_token
2644
+ --------------------------------------------------------
2645
+  (0.1ms) SAVEPOINT active_record_1
2646
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:36:50.761021"], ["updated_at", "2014-12-03 04:36:50.761021"]]
2647
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'e7d32ea41de7ac46031c41a90d6a9f92' LIMIT 1
2648
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "e7d32ea41de7ac46031c41a90d6a9f92"], ["created_at", "2014-12-03 04:36:50.761974"], ["expired_at", "2014-12-03 07:36:50.762617"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2649
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2650
+ Processing by UsersController#index as HTML
2651
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2652
+ ApiKey Load (0.2ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2653
+ Rendered text template (0.0ms)
2654
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2655
+ Completed 401 Unauthorized in 39ms (Views: 37.1ms | ActiveRecord: 0.2ms)
2656
+  (0.5ms) rollback transaction
2657
+  (0.0ms) begin transaction
2658
+ ---------------------------------------------------------
2659
+ UsersControllerTest: test_returns_401_when_not_authorized
2660
+ ---------------------------------------------------------
2661
+ Processing by UsersController#index as JSON
2662
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2663
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
2664
+  (0.1ms) rollback transaction
2665
+  (0.0ms) begin transaction
2666
+ -----------------------------------------------------------
2667
+ UsersControllerTest: test_returns_401_when_token_is_expired
2668
+ -----------------------------------------------------------
2669
+  (0.0ms) SAVEPOINT active_record_1
2670
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:36:50.809748"], ["updated_at", "2014-12-03 04:36:50.809748"]]
2671
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'c275577bc02b23f42b568600dc939719' LIMIT 1
2672
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "c275577bc02b23f42b568600dc939719"], ["created_at", "2014-12-03 04:36:50.810715"], ["expired_at", "2014-12-03 07:36:50.811371"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2673
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2674
+ Processing by UsersController#index as HTML
2675
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2676
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2677
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2678
+ Completed 401 Unauthorized in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)
2679
+  (0.4ms) rollback transaction
2680
+  (0.0ms) begin transaction
2681
+ ---------------------------------------------------------
2682
+ UsersControllerTest: test_returns_success_when_authorized
2683
+ ---------------------------------------------------------
2684
+  (0.0ms) SAVEPOINT active_record_1
2685
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:36:50.817856"], ["updated_at", "2014-12-03 04:36:50.817856"]]
2686
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '50539bb85d7119ec3cd3e5ea4c965b61' LIMIT 1
2687
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "50539bb85d7119ec3cd3e5ea4c965b61"], ["created_at", "2014-12-03 04:36:50.818750"], ["expired_at", "2014-12-03 07:36:50.819402"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2688
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2689
+ Processing by UsersController#index as HTML
2690
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2691
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2692
+ User Load (0.1ms) SELECT "users".* FROM "users"
2693
+ Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.2ms)
2694
+  (0.4ms) rollback transaction
2695
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2696
+  (0.1ms) begin transaction
2697
+ --------------------------------------------------------
2698
+ UsersControllerTest: test_returns_401_when_invalid_token
2699
+ --------------------------------------------------------
2700
+  (0.0ms) SAVEPOINT active_record_1
2701
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:38:57.205233"], ["updated_at", "2014-12-03 04:38:57.205233"]]
2702
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'c2cd5cb09e12ffc072003c78e5aa6bd5' LIMIT 1
2703
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "c2cd5cb09e12ffc072003c78e5aa6bd5"], ["created_at", "2014-12-03 04:38:57.209313"], ["expired_at", "2014-12-03 07:38:57.215013"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2704
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2705
+ Processing by UsersController#index as HTML
2706
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2707
+ ApiKey Load (0.1ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2708
+ Rendered text template (0.0ms)
2709
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2710
+ Completed 401 Unauthorized in 38ms (Views: 36.8ms | ActiveRecord: 0.2ms)
2711
+  (0.6ms) rollback transaction
2712
+  (0.1ms) begin transaction
2713
+ ---------------------------------------------------------
2714
+ UsersControllerTest: test_returns_401_when_not_authorized
2715
+ ---------------------------------------------------------
2716
+ Processing by UsersController#index as JSON
2717
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2718
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
2719
+  (0.0ms) rollback transaction
2720
+  (0.0ms) begin transaction
2721
+ -----------------------------------------------------------
2722
+ UsersControllerTest: test_returns_401_when_token_is_expired
2723
+ -----------------------------------------------------------
2724
+  (0.0ms) SAVEPOINT active_record_1
2725
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:38:57.261241"], ["updated_at", "2014-12-03 04:38:57.261241"]]
2726
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '5e44030e2bcf80b303912b15b6c50d31' LIMIT 1
2727
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "5e44030e2bcf80b303912b15b6c50d31"], ["created_at", "2014-12-03 04:38:57.262132"], ["expired_at", "2014-12-03 07:38:57.262737"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2728
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2729
+ Processing by UsersController#index as HTML
2730
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2731
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2732
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2733
+ Completed 401 Unauthorized in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)
2734
+  (0.4ms) rollback transaction
2735
+  (0.1ms) begin transaction
2736
+ ---------------------------------------------------------
2737
+ UsersControllerTest: test_returns_success_when_authorized
2738
+ ---------------------------------------------------------
2739
+  (0.0ms) SAVEPOINT active_record_1
2740
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:38:57.268080"], ["updated_at", "2014-12-03 04:38:57.268080"]]
2741
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'e42e284c7579175dc533ddb8626d4c93' LIMIT 1
2742
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "e42e284c7579175dc533ddb8626d4c93"], ["created_at", "2014-12-03 04:38:57.268917"], ["expired_at", "2014-12-03 07:38:57.269532"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2743
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2744
+ Processing by UsersController#index as HTML
2745
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2746
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2747
+ User Load (0.1ms) SELECT "users".* FROM "users"
2748
+ Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms)
2749
+  (0.4ms) rollback transaction
2750
+  (0.0ms) begin transaction
2751
+ ---------------------------------
2752
+ UserTest: test_ensures_an_api_key
2753
+ ---------------------------------
2754
+  (0.0ms) SAVEPOINT active_record_1
2755
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:38:57.275903"], ["updated_at", "2014-12-03 04:38:57.275903"]]
2756
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '3560c18fb1d2f27b5978feae4044054b' LIMIT 1
2757
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "3560c18fb1d2f27b5978feae4044054b"], ["created_at", "2014-12-03 04:38:57.276635"], ["expired_at", "2014-12-03 07:38:57.277200"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2758
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2759
+  (0.4ms) rollback transaction
2760
+  (0.0ms) begin transaction
2761
+ -------------------------------
2762
+ UserTest: test_renew_an_api_key
2763
+ -------------------------------
2764
+  (0.0ms) SAVEPOINT active_record_1
2765
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:38:57.279354"], ["updated_at", "2014-12-03 04:38:57.279354"]]
2766
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '31a912852c775ebd0778f4af21f7f1a7' LIMIT 1
2767
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "31a912852c775ebd0778f4af21f7f1a7"], ["created_at", "2014-12-03 04:38:57.280106"], ["expired_at", "2014-12-03 07:38:57.280612"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2768
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2769
+ ApiKey Exists (0.0ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'f6d798355d0864ea17487eff89e9880d' LIMIT 1
2770
+  (0.0ms) SAVEPOINT active_record_1
2771
+ SQL (0.0ms) UPDATE "api_keys" SET "access_token" = ?, "expired_at" = ? WHERE "api_keys"."id" = 1 [["access_token", "f6d798355d0864ea17487eff89e9880d"], ["expired_at", "2014-12-03 11:38:57.281268"]]
2772
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2773
+  (0.8ms) rollback transaction
2774
+  (0.0ms) begin transaction
2775
+ ---------------------------------------------------------------
2776
+ SimpleTokenAuthTest: test_sets_generate_authentication_strategy
2777
+ ---------------------------------------------------------------
2778
+  (0.0ms) rollback transaction
2779
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
2780
+  (0.1ms) begin transaction
2781
+ --------------------------------------------------------
2782
+ UsersControllerTest: test_returns_401_when_invalid_token
2783
+ --------------------------------------------------------
2784
+  (0.0ms) SAVEPOINT active_record_1
2785
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:39:28.259068"], ["updated_at", "2014-12-03 04:39:28.259068"]]
2786
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '38189f7b24faffd2402ab5a9868bd5dd' LIMIT 1
2787
+ SQL (0.2ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "38189f7b24faffd2402ab5a9868bd5dd"], ["created_at", "2014-12-03 04:39:28.264877"], ["expired_at", "2014-12-03 07:39:28.271479"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2788
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2789
+ Processing by UsersController#index as HTML
2790
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2791
+ ApiKey Load (0.1ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2792
+ Rendered text template (0.0ms)
2793
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2794
+ Completed 401 Unauthorized in 39ms (Views: 37.6ms | ActiveRecord: 0.2ms)
2795
+  (0.6ms) rollback transaction
2796
+  (0.1ms) begin transaction
2797
+ ---------------------------------------------------------
2798
+ UsersControllerTest: test_returns_401_when_not_authorized
2799
+ ---------------------------------------------------------
2800
+ Processing by UsersController#index as JSON
2801
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2802
+ Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
2803
+  (0.1ms) rollback transaction
2804
+  (0.0ms) begin transaction
2805
+ -----------------------------------------------------------
2806
+ UsersControllerTest: test_returns_401_when_token_is_expired
2807
+ -----------------------------------------------------------
2808
+  (0.0ms) SAVEPOINT active_record_1
2809
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:39:28.319810"], ["updated_at", "2014-12-03 04:39:28.319810"]]
2810
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '132a26261edd7c0c824b839135c4b8e5' LIMIT 1
2811
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "132a26261edd7c0c824b839135c4b8e5"], ["created_at", "2014-12-03 04:39:28.320813"], ["expired_at", "2014-12-03 07:39:28.321520"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2812
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2813
+ Processing by UsersController#index as HTML
2814
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2815
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2816
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2817
+ Completed 401 Unauthorized in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)
2818
+  (0.4ms) rollback transaction
2819
+  (0.0ms) begin transaction
2820
+ ---------------------------------------------------------
2821
+ UsersControllerTest: test_returns_success_when_authorized
2822
+ ---------------------------------------------------------
2823
+  (0.0ms) SAVEPOINT active_record_1
2824
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:39:28.326679"], ["updated_at", "2014-12-03 04:39:28.326679"]]
2825
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'b5007a04327ca916762ab7a0c61388a2' LIMIT 1
2826
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "b5007a04327ca916762ab7a0c61388a2"], ["created_at", "2014-12-03 04:39:28.327480"], ["expired_at", "2014-12-03 07:39:28.328074"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2827
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2828
+ Processing by UsersController#index as HTML
2829
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2830
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2831
+ User Load (0.1ms) SELECT "users".* FROM "users"
2832
+ Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.2ms)
2833
+  (0.5ms) rollback transaction
2834
+  (0.0ms) begin transaction
2835
+ ---------------------------------------------------------------
2836
+ SimpleTokenAuthTest: test_sets_generate_authentication_strategy
2837
+ ---------------------------------------------------------------
2838
+  (0.0ms) rollback transaction
2839
+  (0.0ms) begin transaction
2840
+ ---------------------------------
2841
+ UserTest: test_ensures_an_api_key
2842
+ ---------------------------------
2843
+  (0.0ms) SAVEPOINT active_record_1
2844
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:39:28.335352"], ["updated_at", "2014-12-03 04:39:28.335352"]]
2845
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'b545570ae722804a9eae547fb2d4683b' LIMIT 1
2846
+ SQL (0.2ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "b545570ae722804a9eae547fb2d4683b"], ["created_at", "2014-12-03 04:39:28.336276"], ["expired_at", "2014-12-03 07:39:28.337456"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2847
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2848
+  (0.5ms) rollback transaction
2849
+  (0.1ms) begin transaction
2850
+ -------------------------------
2851
+ UserTest: test_renew_an_api_key
2852
+ -------------------------------
2853
+  (0.0ms) SAVEPOINT active_record_1
2854
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:39:28.340313"], ["updated_at", "2014-12-03 04:39:28.340313"]]
2855
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'c85fb73739e9c8677fce909dcba9756a' LIMIT 1
2856
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "c85fb73739e9c8677fce909dcba9756a"], ["created_at", "2014-12-03 04:39:28.340945"], ["expired_at", "2014-12-03 07:39:28.341399"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2857
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2858
+ ApiKey Exists (0.0ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '4c0242c861b9435b696e4290a6b985f6' LIMIT 1
2859
+  (0.0ms) SAVEPOINT active_record_1
2860
+ SQL (0.0ms) UPDATE "api_keys" SET "access_token" = ?, "expired_at" = ? WHERE "api_keys"."id" = 1 [["access_token", "4c0242c861b9435b696e4290a6b985f6"], ["expired_at", "2014-12-03 11:39:28.342012"]]
2861
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2862
+  (0.6ms) rollback transaction
2863
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2864
+  (0.1ms) begin transaction
2865
+ --------------------------------------------------------
2866
+ UsersControllerTest: test_returns_401_when_invalid_token
2867
+ --------------------------------------------------------
2868
+  (0.0ms) SAVEPOINT active_record_1
2869
+ SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:39:42.723201"], ["updated_at", "2014-12-03 04:39:42.723201"]]
2870
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '473d7b859833a7064ed579a186028641' LIMIT 1
2871
+ SQL (0.2ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "473d7b859833a7064ed579a186028641"], ["created_at", "2014-12-03 04:39:42.727163"], ["expired_at", "2014-12-03 07:39:42.732883"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2872
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2873
+ Processing by UsersController#index as HTML
2874
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2875
+ ApiKey Load (0.1ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2876
+ Rendered text template (0.0ms)
2877
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2878
+ Completed 401 Unauthorized in 36ms (Views: 34.3ms | ActiveRecord: 0.2ms)
2879
+  (0.6ms) rollback transaction
2880
+  (0.1ms) begin transaction
2881
+ ---------------------------------------------------------
2882
+ UsersControllerTest: test_returns_401_when_not_authorized
2883
+ ---------------------------------------------------------
2884
+ Processing by UsersController#index as JSON
2885
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2886
+ Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
2887
+  (0.0ms) rollback transaction
2888
+  (0.0ms) begin transaction
2889
+ -----------------------------------------------------------
2890
+ UsersControllerTest: test_returns_401_when_token_is_expired
2891
+ -----------------------------------------------------------
2892
+  (0.0ms) SAVEPOINT active_record_1
2893
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:39:42.776872"], ["updated_at", "2014-12-03 04:39:42.776872"]]
2894
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '654fe07b9624b8977a9229136a15c8da' LIMIT 1
2895
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "654fe07b9624b8977a9229136a15c8da"], ["created_at", "2014-12-03 04:39:42.777811"], ["expired_at", "2014-12-03 07:39:42.778430"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2896
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2897
+ Processing by UsersController#index as HTML
2898
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2899
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2900
+ Filter chain halted as :authenticate_user_from_token! rendered or redirected
2901
+ Completed 401 Unauthorized in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)
2902
+  (0.4ms) rollback transaction
2903
+  (0.1ms) begin transaction
2904
+ ---------------------------------------------------------
2905
+ UsersControllerTest: test_returns_success_when_authorized
2906
+ ---------------------------------------------------------
2907
+  (0.0ms) SAVEPOINT active_record_1
2908
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:39:42.783463"], ["updated_at", "2014-12-03 04:39:42.783463"]]
2909
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '500307e62017798c0d70df246f8d2efe' LIMIT 1
2910
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "500307e62017798c0d70df246f8d2efe"], ["created_at", "2014-12-03 04:39:42.784292"], ["expired_at", "2014-12-03 07:39:42.784901"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2911
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2912
+ Processing by UsersController#index as HTML
2913
+ User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
2914
+ ApiKey Load (0.0ms) SELECT "api_keys".* FROM "api_keys" WHERE "api_keys"."token_authenticatable_id" = ? AND "api_keys"."token_authenticatable_type" = ? LIMIT 1 [["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2915
+ User Load (0.1ms) SELECT "users".* FROM "users"
2916
+ Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.2ms)
2917
+  (0.5ms) rollback transaction
2918
+  (0.0ms) begin transaction
2919
+ ---------------------------------
2920
+ UserTest: test_ensures_an_api_key
2921
+ ---------------------------------
2922
+  (0.0ms) SAVEPOINT active_record_1
2923
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:39:42.790690"], ["updated_at", "2014-12-03 04:39:42.790690"]]
2924
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'd4b4728ee909f9898bc053de3665b3e4' LIMIT 1
2925
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "d4b4728ee909f9898bc053de3665b3e4"], ["created_at", "2014-12-03 04:39:42.791427"], ["expired_at", "2014-12-03 07:39:42.791983"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2926
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2927
+  (0.4ms) rollback transaction
2928
+  (0.0ms) begin transaction
2929
+ -------------------------------
2930
+ UserTest: test_renew_an_api_key
2931
+ -------------------------------
2932
+  (0.0ms) SAVEPOINT active_record_1
2933
+ SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-12-03 04:39:42.794027"], ["updated_at", "2014-12-03 04:39:42.794027"]]
2934
+ ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'cdcac948b4638ae593a562ee62c222ac' LIMIT 1
2935
+ SQL (0.1ms) INSERT INTO "api_keys" ("access_token", "created_at", "expired_at", "token_authenticatable_id", "token_authenticatable_type") VALUES (?, ?, ?, ?, ?) [["access_token", "cdcac948b4638ae593a562ee62c222ac"], ["created_at", "2014-12-03 04:39:42.794770"], ["expired_at", "2014-12-03 07:39:42.795263"], ["token_authenticatable_id", 1], ["token_authenticatable_type", "User"]]
2936
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2937
+ ApiKey Exists (0.0ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '7c259a843a0deec5e47213e1c250be91' LIMIT 1
2938
+  (0.0ms) SAVEPOINT active_record_1
2939
+ SQL (0.0ms) UPDATE "api_keys" SET "access_token" = ?, "expired_at" = ? WHERE "api_keys"."id" = 1 [["access_token", "7c259a843a0deec5e47213e1c250be91"], ["expired_at", "2014-12-03 11:39:42.795919"]]
2940
+  (0.0ms) RELEASE SAVEPOINT active_record_1
2941
+  (0.7ms) rollback transaction
2942
+  (0.0ms) begin transaction
2943
+ ---------------------------------------------------------------
2944
+ SimpleTokenAuthTest: test_sets_generate_authentication_strategy
2945
+ ---------------------------------------------------------------
2946
+  (0.0ms) rollback transaction