(0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (1.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (18.8ms) select sqlite_version(*)  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateUsers (20141015200820)  (0.1ms) begin transaction  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141015200820"]]  (1.2ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to SimpleTokenAuthorizationAddAuthenticationTokenToUsers (20141015201105)  (0.1ms) begin transaction  (0.5ms) ALTER TABLE "users" ADD "authentication_token" varchar(255)  (0.1ms) select sqlite_version(*)  (0.9ms) CREATE UNIQUE INDEX "index_users_on_authentication_token" ON "users" ("authentication_token") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141015201105"]]  (1.0ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_users_on_authentication_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_users_on_authentication_token' AND type='index'  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized ---------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized ---------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized ---------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized ---------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized ---------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized ---------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized ---------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized ---------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized ---------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized ---------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized ---------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized ---------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized ---------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized ---------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 99ms (Views: 98.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 33ms (Views: 32.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 36ms (Views: 35.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 36ms (Views: 34.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 35ms (Views: 34.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 36ms (Views: 35.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 35ms (Views: 34.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (13.4ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 't4de1Jo2gn4Gxs_HgCG-' LIMIT 1 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"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML Completed 500 Internal Server Error in 0ms  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 35ms (Views: 34.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'ADcRqWzzPCvj-EJ-Kfyz' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML Completed 500 Internal Server Error in 0ms  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 37ms (Views: 36.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'HzdKhNftETQekPk1CRnD' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 34ms (Views: 33.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'keuCQ9XZhVog_iwvpTw6' LIMIT 1 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"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML Completed 500 Internal Server Error in 0ms  (0.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 34ms (Views: 33.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'jv5xUK6sSxj4-T7GCEVc' LIMIT 1 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"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML Completed 500 Internal Server Error in 0ms  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 39ms (Views: 38.6ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'myUvDH8Y4_JjcHwTUWNz' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 Completed 500 Internal Server Error in 1ms  (0.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 38ms (Views: 36.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'fs8yS1_you3mD9njXPPL' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 Completed 500 Internal Server Error in 1ms  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 34ms (Views: 32.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'usfoLoH38kxqwfguhHN8' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 37ms (Views: 36.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'g4aJoyTWysNAdPynorKx' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 36ms (Views: 34.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = '7MU7rwKvszhnUuu-zALR' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 40ms (Views: 0.5ms | ActiveRecord: 0.2ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 41ms (Views: 39.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = '3z5c93zy2dZqTMoJNeFE' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 38ms (Views: 37.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'gWKRhmN6UEszRjy92Ats' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 36ms (Views: 34.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = '8r6Vn5H8pcofCCRzEF9G' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 38ms (Views: 36.8ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'knu-Ty1ynsoVtu-Ldxk9' LIMIT 1 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"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 2ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 34ms (Views: 33.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'XTjyzb1mS4TW5ax4iUDL' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 2ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (170.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 35ms (Views: 34.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'Y2p-hh5qsYuG7F7GQBni' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 2ms  (0.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 34ms (Views: 33.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'yaQ9MWvxX9BWSk5orbF6' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 38ms (Views: 37.4ms | ActiveRecord: 0.1ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 35ms (Views: 33.8ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'TVzQ7iYFVnEfdwd_GQaW' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.7ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 37ms (Views: 35.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'CQERa-Ph14gigefdu4Gk' LIMIT 1 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"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 2ms  (0.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 36ms (Views: 34.8ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'Ugs93j1T7kycPN5MHkpf' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'zLRyF2u1Gmtv2aCyk8zr' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 4ms (Views: 3.2ms | ActiveRecord: 0.1ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'VQRAvJJ6xjVQsS7AQKYJ' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'zJ5LhkjEdGzsCfSyHY3x' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 4ms (Views: 3.1ms | ActiveRecord: 0.1ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'k81Mbx7T5YhSRc2rQbXn' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (8.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (13.4ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'qYwNYuESz3EfR5vNLEsH' LIMIT 1 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"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 40ms (Views: 38.6ms | ActiveRecord: 0.1ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'tXtB31_8wQqWjHccVe8x' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.1ms)  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = '3ax9_3wyymFdY8E2B8iT' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 4ms (Views: 3.2ms | ActiveRecord: 0.1ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'DzsDmSM6BmP3D3y5PaST' LIMIT 1 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"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (7.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'XuDj2aUVZH37znBmxRJm' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 4ms (Views: 3.2ms | ActiveRecord: 0.1ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'EfpVmEVyYDLMXe182tQ8' LIMIT 1 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"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.1ms)  (9.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'v6xATCtUWrSy_pbQxnQT' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 4ms (Views: 3.1ms | ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = '9qnwDTcGz93ZhxbtTLxg' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'shit' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 4ms (Views: 3.4ms | ActiveRecord: 0.1ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'shit' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (9.7ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 6ms (Views: 5.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 4ms (Views: 3.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'rnMEGxxAK4kyfzJFKMey' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 4ms (Views: 3.3ms | ActiveRecord: 0.1ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = '_L2x6sMXb4wMxMBbQPH-' LIMIT 1 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"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'bzVZ1B7b9xscYQ38jg88' LIMIT 1 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"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 5ms (Views: 3.7ms | ActiveRecord: 0.1ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'GNwu7znexYzdXzom551B' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'Cm66eBKYLhz-6YtvRvjP' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 4ms (Views: 3.3ms | ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'dJgDgxXKq1LELpbyRvD4' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 1ms  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'qvnWutkSVeDTwL4we-yL' LIMIT 1 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"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 4ms (Views: 3.2ms | ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.3ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'qmb8yPJsU2-C16KM1YaT' LIMIT 1 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"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 1ms  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = '4Muz3sV3YMd7zFDLyAkd' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 4ms (Views: 3.2ms | ActiveRecord: 0.1ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'EoyVzMsMUr9TvUWxQbtd' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 1ms  (10.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'TCRsJ-4CeQ4ucTTcyaTJ' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 4ms (Views: 3.1ms | ActiveRecord: 0.1ms)  (0.7ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'sr3MZHFeFZQaMXZrAyCB' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (10.9ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = 'wzeTe8ACbp-KhsyxnRQR' LIMIT 1 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"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 51ms (Views: 49.2ms | ActiveRecord: 0.1ms)  (12.3ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."authentication_token" = '8y6BaaTrzPrZn1yLvNwo' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ SimpleTokenAuthorizationTest: test_sets_generate_authentication_strategy ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 27ms (Views: 26.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------- UsersControllerTest: test_returns_401_when_token_is_expired -----------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------- UserTest: test_ensures_an_api_key ---------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------- SimpleTokenAuthTest: test_sets_generate_authentication_strategy ---------------------------------------------------------------  (0.0ms) rollback transaction  (1.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) select sqlite_version(*)  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateUsers (20141015200820)  (0.1ms) begin transaction  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime) SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141015200820"]]  (1.3ms) commit transaction Migrating to SimpleTokenAuthMigration (20141203033703) ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateUsers (20141015200820)  (0.1ms) begin transaction  (0.5ms) DROP TABLE "users" SQL (0.1ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = '20141015200820'  (0.9ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateUsers (20141015200820)  (0.1ms) begin transaction  (0.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)  SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141015200820"]]  (1.2ms) commit transaction Migrating to SimpleTokenAuthMigration (20141203034209)  (0.1ms) begin transaction  (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)   (0.1ms) select sqlite_version(*)  (1.0ms) CREATE UNIQUE INDEX "index_api_keys_on_access_token" ON "api_keys" ("access_token") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141203034209"]]  (3.9ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_api_keys_on_access_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_api_keys_on_access_token' AND type='index'  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------- UserTest: test_ensures_an_api_key ---------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 3ms (Views: 3.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- UsersControllerTest: test_returns_401_when_token_is_expired -----------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------- SimpleTokenAuthTest: test_sets_generate_authentication_strategy ---------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------------- SimpleTokenAuthTest: test_sets_generate_authentication_strategy ---------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '93866f9481bc46297e2628cc35ce8c31' LIMIT 1 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"]] 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 (?, ?, ?, ?)  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 4ms (Views: 3.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- UsersControllerTest: test_returns_401_when_token_is_expired -----------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'bb56bd016e643eb581d6141b315e887f' LIMIT 1 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"]] 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 (?, ?, ?, ?)  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------- UserTest: test_ensures_an_api_key ---------------------------------  (0.0ms) SAVEPOINT active_record_1 ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '26e9d1db537f4f9cdccef1e6e1169f26' LIMIT 1 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"]] 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 (?, ?, ?, ?)  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------------- SimpleTokenAuthTest: test_sets_generate_authentication_strategy ---------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '27807cb4d6155fcc5a1c5182ab117dd5' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 1ms  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 5ms (Views: 4.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- UsersControllerTest: test_returns_401_when_token_is_expired -----------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '926b79890bee2342f50d2dcb4c4489f9' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------- UserTest: test_ensures_an_api_key ---------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '784997b32a32aa8df09daf696e7166fd' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------- UserTest: test_ensures_an_api_key ---------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '4cbb9d17edc0f2a3b22a717ac56830d3' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------- SimpleTokenAuthTest: test_sets_generate_authentication_strategy ---------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '75402dfb2e82bcf87666860bc3159ab6' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 1ms  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 3ms (Views: 3.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- UsersControllerTest: test_returns_401_when_token_is_expired -----------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'a1e9781c207fc52824a7b384fc2fad31' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 1ms  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------- UserTest: test_ensures_an_api_key ---------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '3b309cc222040c50e52ac34844069077' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------- SimpleTokenAuthTest: test_sets_generate_authentication_strategy ---------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '78d165f2348d4d9d1ab45c7b7b714903' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 1ms  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 4ms (Views: 4.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- UsersControllerTest: test_returns_401_when_token_is_expired -----------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '73c87bc99590d71b147044eea0996328' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Completed 500 Internal Server Error in 1ms  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------- UserTest: test_ensures_an_api_key ---------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '5fb4d08af4b1fdacd850ae24e066531c' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------- SimpleTokenAuthTest: test_sets_generate_authentication_strategy ---------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '1f341888ae437e64053094622cc94502' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 5ms (Views: 3.3ms | ActiveRecord: 0.2ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- UsersControllerTest: test_returns_401_when_token_is_expired -----------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '2a285c7f05ec984118da630852488eb3' LIMIT 1 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"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.2ms)  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------------- SimpleTokenAuthTest: test_sets_generate_authentication_strategy ---------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------- UserTest: test_ensures_an_api_key ---------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.2ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '99bd4b77821abd577e4ee40ba5035eaf' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'e0fe93e872ca89cfcea6be88be312833' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 5ms (Views: 3.5ms | ActiveRecord: 0.2ms)  (1.7ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- UsersControllerTest: test_returns_401_when_token_is_expired -----------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'b60c31d7662df56ea9d4ca251c147b1f' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '3d8c15d413c7b0e0a9cc8d5182578841' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.2ms)  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------- UserTest: test_ensures_an_api_key ---------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '63b05848cff9bfdb2bd098ef6326aa22' LIMIT 1 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"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------- SimpleTokenAuthTest: test_sets_generate_authentication_strategy ---------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '5b72bd9da17016080d68615697c1137c' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 39ms (Views: 37.8ms | ActiveRecord: 0.2ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- UsersControllerTest: test_returns_401_when_token_is_expired -----------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'e825257d430c93654babe79e1c80f991' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] User Load (0.0ms) SELECT "users".* FROM "users" Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '8dd04c6bf004c6a1d5d33b93dda9108e' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------- UserTest: test_ensures_an_api_key ---------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.2ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '77df732145f9bae0b6155e81b0318563' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------- SimpleTokenAuthTest: test_sets_generate_authentication_strategy ---------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '57fc2842c723f3cfe756aedf29f1683b' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Completed 500 Internal Server Error in 2ms  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 38ms (Views: 37.8ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- UsersControllerTest: test_returns_401_when_token_is_expired -----------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '686424c4a681c4557ba5e5fb4910857c' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Completed 500 Internal Server Error in 0ms  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '1379285dee5ade040b754c9c2e7942d7' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Completed 500 Internal Server Error in 1ms  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------- UserTest: test_ensures_an_api_key ---------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.2ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '59844ac06262b01108676ce412aedc9e' LIMIT 1 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"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------- SimpleTokenAuthTest: test_sets_generate_authentication_strategy ---------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '435cf2dc42f905232c935a06ea380da3' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 36ms (Views: 34.5ms | ActiveRecord: 0.2ms)  (0.6ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- UsersControllerTest: test_returns_401_when_token_is_expired -----------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '94ca245eb7592167c6651a91dda931b4' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '0882627fc79786152f9f46d65cf435d5' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '3471d14fe3e4349b9954c0be928c8846' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 39ms (Views: 36.8ms | ActiveRecord: 0.3ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- UsersControllerTest: test_returns_401_when_token_is_expired -----------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'ff0a288c1804ac6fab95d85e0fa68508' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] User Load (0.0ms) SELECT "users".* FROM "users" Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'f8763dacd2ba5438e20fe5111ec0d225' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 2ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------- SimpleTokenAuthTest: test_sets_generate_authentication_strategy ---------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------- UserTest: test_ensures_an_api_key ---------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'a876ef5694526371cf1e6486ed110865' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------- UserTest: test_ensures_an_api_key ---------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '1177a43b68539ea6aa8ba22651234f9c' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'beba39b4d208f459b0b75e5f804967f6' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 38ms (Views: 36.4ms | ActiveRecord: 0.2ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- UsersControllerTest: test_returns_401_when_token_is_expired -----------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '5a0fac9e41067cb6cf0a550fba035c52' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'f4f959ae0359c8398bc4f6e2e224668a' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------- SimpleTokenAuthTest: test_sets_generate_authentication_strategy ---------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------- UserTest: test_ensures_an_api_key ---------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'fea463c58f828f273482b7e381566fc1' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------- UserTest: test_renew_an_api_key -------------------------------  (0.1ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '1dbed2cf47bd3fd59d883d15ca49e6a0' LIMIT 1 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"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '381cd7105c81970ef9ac62ddb38e1387' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 39ms (Views: 37.5ms | ActiveRecord: 0.2ms)  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- UsersControllerTest: test_returns_401_when_token_is_expired -----------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'a1b30f8db595c2de42535cea6ec58509' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '1b7ac358c4bb6ccac815c6d826b9da49' LIMIT 1 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"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.2ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------- SimpleTokenAuthTest: test_sets_generate_authentication_strategy ---------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------- UserTest: test_ensures_an_api_key ---------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.2ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '3533ae7aaef8326509725f02a1c93a36' LIMIT 1 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"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------- UserTest: test_renew_an_api_key -------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '0b00a4b90c454a642666fcf1063639df' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (15.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'a68be1e8ea0c2c995748b7c302fb0476' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 40ms (Views: 38.7ms | ActiveRecord: 0.2ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- UsersControllerTest: test_returns_401_when_token_is_expired -----------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '47f673458af2f2c26ae8e866f58feb47' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '15aadb35a115646d860ffc9ec379979f' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------- SimpleTokenAuthTest: test_sets_generate_authentication_strategy ---------------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------- UserTest: test_ensures_an_api_key ---------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'fc9dfd7a2e329df84c436c8bfc859eeb' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------- UserTest: test_renew_an_api_key -------------------------------  (0.1ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '587b26fa8bbdd9a2c9f14b6b23ba570d' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (13.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '747b5461904fe2e3ceaf318f88fce994' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 35ms (Views: 33.5ms | ActiveRecord: 0.2ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- UsersControllerTest: test_returns_401_when_token_is_expired -----------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '6fcb11788525b347dee294d355b0d7c3' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'a965a8619a97803bf7ac774c2ac0de2c' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------- SimpleTokenAuthTest: test_sets_generate_authentication_strategy ---------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------------------- SimpleTokenAuthTest: test_sets_generate_authentication_strategy ---------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------- UserTest: test_ensures_an_api_key ---------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'e30056ea8ecdcd299b764a9b1f461c6c' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.7ms) begin transaction ------------------------------- UserTest: test_renew_an_api_key -------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'ffe5e8a37e7df1469660e7dd4d4290ff' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ApiKey Exists (0.0ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'b9ed0c3ead01ed5425213ebed9b21828' LIMIT 1  (0.0ms) SAVEPOINT active_record_1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'f9b7ad5789e85cb3a8d978e34eaeaefe' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 39ms (Views: 37.0ms | ActiveRecord: 0.2ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- UsersControllerTest: test_returns_401_when_token_is_expired -----------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'e58872cd8d7d96ad4957aea83893bfaf' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '1e7a5570adb2c64634be7ba19b5de30b' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------- UserTest: test_ensures_an_api_key ---------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'd0d92d74b8096e39e678a88f5bba8a74' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------- UserTest: test_renew_an_api_key -------------------------------  (0.1ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'fc2746f14aee012d99ae76f4a262189e' LIMIT 1 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"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ApiKey Exists (0.0ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '0f8b557eb886d4180c2b3562d085f95e' LIMIT 1  (0.0ms) SAVEPOINT active_record_1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------- SimpleTokenAuthTest: test_sets_generate_authentication_strategy ---------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'e7d32ea41de7ac46031c41a90d6a9f92' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 39ms (Views: 37.1ms | ActiveRecord: 0.2ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- UsersControllerTest: test_returns_401_when_token_is_expired -----------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'c275577bc02b23f42b568600dc939719' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '50539bb85d7119ec3cd3e5ea4c965b61' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.2ms)  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'c2cd5cb09e12ffc072003c78e5aa6bd5' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 38ms (Views: 36.8ms | ActiveRecord: 0.2ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- UsersControllerTest: test_returns_401_when_token_is_expired -----------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '5e44030e2bcf80b303912b15b6c50d31' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'e42e284c7579175dc533ddb8626d4c93' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------- UserTest: test_ensures_an_api_key ---------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '3560c18fb1d2f27b5978feae4044054b' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------- UserTest: test_renew_an_api_key -------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '31a912852c775ebd0778f4af21f7f1a7' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ApiKey Exists (0.0ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'f6d798355d0864ea17487eff89e9880d' LIMIT 1  (0.0ms) SAVEPOINT active_record_1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------- SimpleTokenAuthTest: test_sets_generate_authentication_strategy ---------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '38189f7b24faffd2402ab5a9868bd5dd' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 39ms (Views: 37.6ms | ActiveRecord: 0.2ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- UsersControllerTest: test_returns_401_when_token_is_expired -----------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '132a26261edd7c0c824b839135c4b8e5' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'b5007a04327ca916762ab7a0c61388a2' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.2ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------- SimpleTokenAuthTest: test_sets_generate_authentication_strategy ---------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------- UserTest: test_ensures_an_api_key ---------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'b545570ae722804a9eae547fb2d4683b' LIMIT 1 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"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------- UserTest: test_renew_an_api_key -------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'c85fb73739e9c8677fce909dcba9756a' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ApiKey Exists (0.0ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '4c0242c861b9435b696e4290a6b985f6' LIMIT 1  (0.0ms) SAVEPOINT active_record_1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction -------------------------------------------------------- UsersControllerTest: test_returns_401_when_invalid_token --------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '473d7b859833a7064ed579a186028641' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Rendered text template (0.0ms) Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 36ms (Views: 34.3ms | ActiveRecord: 0.2ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_401_when_not_authorized --------------------------------------------------------- Processing by UsersController#index as JSON Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------- UsersControllerTest: test_returns_401_when_token_is_expired -----------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '654fe07b9624b8977a9229136a15c8da' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] Filter chain halted as :authenticate_user_from_token! rendered or redirected Completed 401 Unauthorized in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------- UsersControllerTest: test_returns_success_when_authorized ---------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '500307e62017798c0d70df246f8d2efe' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by UsersController#index as HTML User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] 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"]] User Load (0.1ms) SELECT "users".* FROM "users" Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.2ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------- UserTest: test_ensures_an_api_key ---------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'd4b4728ee909f9898bc053de3665b3e4' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------- UserTest: test_renew_an_api_key -------------------------------  (0.0ms) SAVEPOINT active_record_1 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"]] ApiKey Exists (0.1ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = 'cdcac948b4638ae593a562ee62c222ac' LIMIT 1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ApiKey Exists (0.0ms) SELECT 1 AS one FROM "api_keys" WHERE "api_keys"."access_token" = '7c259a843a0deec5e47213e1c250be91' LIMIT 1  (0.0ms) SAVEPOINT active_record_1 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"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------- SimpleTokenAuthTest: test_sets_generate_authentication_strategy ---------------------------------------------------------------  (0.0ms) rollback transaction