test/dummy/log/test.log in oauth_service-0.0.1 vs test/dummy/log/test.log in oauth_service-0.0.2
- old
+ new
@@ -856,5 +856,6951 @@
[1m[35m (0.1ms)[0m begin transaction
------------------------------------
OauthServiceProviderTest: test_truth
------------------------------------
[1m[36m (0.2ms)[0m [1mrollback transaction[0m
+ [1m[36m (125.3ms)[0m [1mCREATE TABLE "urls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "url_pattern" varchar, "name" varchar, "http_method" varchar) [0m
+ [1m[35m (99.1ms)[0m CREATE TABLE "user_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
+ [1m[36m (0.2ms)[0m [1mselect sqlite_version(*)[0m
+ [1m[35m (109.0ms)[0m CREATE INDEX "index_user_groups_on_name" ON "user_groups" ("name")
+ [1m[36m (106.7ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "api_code" varchar) [0m
+ [1m[35m (106.6ms)[0m CREATE INDEX "index_users_on_name" ON "users" ("name")
+ [1m[36m (106.6ms)[0m [1mCREATE TABLE "users_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_group_id" integer, "user_id" integer) [0m
+ [1m[35m (116.1ms)[0m CREATE TABLE "users_urls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "users_group_id" integer, "url_id" integer)
+ [1m[36m (132.3ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
+ [1m[35m (106.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
+ [1m[36m (0.3ms)[0m [1mSELECT version FROM "schema_migrations"[0m
+ [1m[35m (106.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160514163909')
+ [1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.2ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/localhost:3000/login" for 127.0.0.1 at 2016-05-15 01:07:29 +0300
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/localhost:3000/login" for 127.0.0.1 at 2016-05-15 01:08:19 +0300
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:08:43 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+Completed 500 Internal Server Error in 9ms (ActiveRecord: 0.2ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:09:37 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+Completed 500 Internal Server Error in 10ms (ActiveRecord: 0.2ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:10:24 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+Completed 500 Internal Server Error in 9ms (ActiveRecord: 0.2ms)
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.0ms)[0m rollback transaction
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:10:49 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (1.9ms)
+Completed 200 OK in 170ms (Views: 154.2ms | ActiveRecord: 0.3ms)
+Started GET "/authorize?client_id=4ecb46d4824c4b3fb7bc69a1a34dcf4f&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Foauth%2Fyandex&scope=email+profile" for 127.0.0.1 at 2016-05-15 01:10:49 +0300
+ [1m[36m (0.4ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:13:15 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (2.0ms)
+Completed 200 OK in 169ms (Views: 152.7ms | ActiveRecord: 0.3ms)
+Started GET "/authorize?client_id=4ecb46d4824c4b3fb7bc69a1a34dcf4f&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Foauth%2Fyandex&scope=email+profile" for 127.0.0.1 at 2016-05-15 01:13:15 +0300
+ [1m[36m (0.2ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name") VALUES (?) [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Test"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?)[0m [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_urls" ("url_id") VALUES (?) [["url_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:18:42 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.1ms)
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:18:58 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (2.0ms)
+Completed 200 OK in 174ms (Views: 157.4ms | ActiveRecord: 0.3ms)
+Started GET "/authorize?client_id=4ecb46d4824c4b3fb7bc69a1a34dcf4f&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Foauth%2Fyandex&scope=email+profile" for 127.0.0.1 at 2016-05-15 01:18:58 +0300
+ [1m[36m (0.2ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:19:11 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (2.1ms)
+Completed 200 OK in 171ms (Views: 154.2ms | ActiveRecord: 0.3ms)
+Started GET "/authorize?client_id=4ecb46d4824c4b3fb7bc69a1a34dcf4f&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Foauth%2Fyandex&scope=email+profile" for 127.0.0.1 at 2016-05-15 01:19:11 +0300
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:21:38 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (2.0ms)
+Completed 200 OK in 170ms (Views: 153.4ms | ActiveRecord: 0.3ms)
+Started GET "/o/oauth2/auth?client_id=24046466848-0lp2mda92adg6do67kr2d0frphbu5aqg.apps.googleusercontent.com&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Foauth%2Fgoogle&scope=email+profile" for 127.0.0.1 at 2016-05-15 01:21:38 +0300
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:23:15 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (2.0ms)
+Completed 200 OK in 178ms (Views: 161.9ms | ActiveRecord: 0.3ms)
+Started GET "/o/oauth2/auth?client_id=24046466848-0lp2mda92adg6do67kr2d0frphbu5aqg.apps.googleusercontent.com&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Foauth%2Fgoogle&scope=email+profile" for 127.0.0.1 at 2016-05-15 01:23:15 +0300
+ [1m[36m (0.2ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:28:26 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (2.0ms)
+Completed 200 OK in 168ms (Views: 151.9ms | ActiveRecord: 0.3ms)
+Started GET "/authorize?client_id=4ecb46d4824c4b3fb7bc69a1a34dcf4f&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Foauth%2Fyandex&scope=email+profile" for 127.0.0.1 at 2016-05-15 01:28:26 +0300
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:30:57 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (2.0ms)
+Completed 200 OK in 166ms (Views: 149.7ms | ActiveRecord: 0.3ms)
+Started GET "/authorize?client_id=4ecb46d4824c4b3fb7bc69a1a34dcf4f&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Foauth%2Fyandex&scope=email+profile" for 127.0.0.1 at 2016-05-15 01:30:57 +0300
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+Started GET "/login/" for 127.0.0.1 at 2016-05-15 01:31:26 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (1.9ms)
+Completed 200 OK in 166ms (Views: 149.9ms | ActiveRecord: 0.3ms)
+Started GET "/authorize?client_id=4ecb46d4824c4b3fb7bc69a1a34dcf4f&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Foauth%2Fyandex&scope=email+profile" for 127.0.0.1 at 2016-05-15 01:31:26 +0300
+ [1m[36m (0.2ms)[0m [1mrollback transaction[0m
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+Started GET "/" for 127.0.0.1 at 2016-05-15 01:31:37 +0300
+ [1m[36m (0.2ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+Started GET "/welcome" for 127.0.0.1 at 2016-05-15 01:31:52 +0300
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+Started GET "/oauth/google" for 127.0.0.1 at 2016-05-15 01:32:09 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"provider_name"=>"google"}
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+Completed 400 Bad Request in 136ms (Views: 0.4ms | ActiveRecord: 0.3ms)
+ [1m[36m (0.3ms)[0m [1mrollback transaction[0m
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:32:31 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (1.9ms)
+Completed 200 OK in 163ms (Views: 146.3ms | ActiveRecord: 0.3ms)
+Started GET "/authorize?client_id=4ecb46d4824c4b3fb7bc69a1a34dcf4f&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Foauth%2Fyandex&scope=email+profile" for 127.0.0.1 at 2016-05-15 01:32:32 +0300
+ [1m[36m (0.1ms)[0m [1mrollback transaction[0m
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:36:16 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.3ms)
+ [1m[35m (0.4ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:36:26 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.4ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:36:56 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.3ms)
+ [1m[36m (0.2ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:38:21 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.3ms)
+ [1m[36m (0.2ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:39:06 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users"
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+Completed 500 Internal Server Error in 6ms (ActiveRecord: 0.4ms)
+ [1m[35m (0.2ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:40:58 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.3ms)
+ [1m[36m (0.2ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:41:37 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.3ms)
+ [1m[35m (0.2ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:42:09 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.3ms)
+ [1m[35m (0.2ms)[0m rollback transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:44:43 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.3ms)
+ [1m[35m (0.2ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+Started GET "/" for 127.0.0.1 at 2016-05-15 01:44:47 +0300
+Started GET "/index" for 127.0.0.1 at 2016-05-15 01:44:51 +0300
+Started GET "/d" for 127.0.0.1 at 2016-05-15 01:44:55 +0300
+Processing by DController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.3ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:45:53 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.2ms)
+ [1m[35m (0.3ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:46:08 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.3ms)
+ [1m[35m (0.2ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:47:19 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+Completed 500 Internal Server Error in 5ms (ActiveRecord: 0.3ms)
+ [1m[35m (0.4ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:47:52 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.3ms)
+ [1m[35m (0.3ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:48:15 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.3ms)
+ [1m[36m (0.2ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name", "id") VALUES (?, ?) [["name", "guest"], ["id", 1]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("id", "name") VALUES (?, ?)[0m [["id", 1], ["name", "Guest"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?) [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.0ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:48:53 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.3ms)
+ [1m[35m (0.3ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name", "id") VALUES (?, ?)[0m [["name", "guest"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("id", "name") VALUES (?, ?) [["id", 1], ["name", "Guest"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users" ("name") VALUES (?) [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Test"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 2], ["user_group_id", 2]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?)[0m [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_urls" ("url_id") VALUES (?) [["url_id", 3]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:52:53 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+Completed 500 Internal Server Error in 5ms (ActiveRecord: 0.3ms)
+ [1m[36m (0.2ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name", "id") VALUES (?, ?)[0m [["name", "guest"], ["id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "user_groups" ("id", "name") VALUES (?, ?) [["id", 1], ["name", "Guest"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.0ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users" ("name") VALUES (?) [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Test"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 2], ["user_group_id", 2]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?)[0m [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_urls" ("url_id") VALUES (?) [["url_id", 3]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:56:39 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.3ms)
+ [1m[36m (0.2ms)[0m [1mrollback transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name", "id") VALUES (?, ?)[0m [["name", "guest"], ["id", 1]]
+ [1m[35m (111.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[36m (103.3ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[35m (105.5ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("id", "name") VALUES (?, ?) [["id", 1], ["name", "Guest"]]
+ [1m[36m (105.5ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[35m (90.9ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[36m (95.6ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.3ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[35m (96.3ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("name") VALUES (?) [["name", "bar555@yandex.ru"]]
+ [1m[36m (104.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Test"]]
+ [1m[35m (112.3ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 2], ["user_group_id", 2]]
+ [1m[36m (113.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?)[0m [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[35m (104.1ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users_urls" ("url_id") VALUES (?) [["url_id", 3]]
+ [1m[36m (113.2ms)[0m [1mcommit transaction[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users"
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:58:06 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.2ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (3.4ms)
+Completed 200 OK in 215ms (Views: 195.2ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 01:58:07 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 01:58:07 +0300
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name", "id") VALUES (?, ?)[0m [["name", "guest"], ["id", 1]]
+ [1m[35m (0.0ms)[0m rollback transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (110.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (119.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 3], ["user_group_id", 3]]
+ [1m[35m (123.6ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (117.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 4]]
+ [1m[35m (126.4ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 01:59:27 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.5ms)
+Completed 200 OK in 247ms (Views: 230.1ms | ActiveRecord: 0.6ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 01:59:27 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 01:59:27 +0300
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (125.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (88.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 4], ["user_group_id", 4]]
+ [1m[35m (91.7ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (128.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 5]]
+ [1m[35m (126.9ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:00:53 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (4.9ms)
+Completed 200 OK in 237ms (Views: 205.6ms | ActiveRecord: 0.8ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:00:53 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:00:53 +0300
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (127.6ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (105.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 5], ["user_group_id", 5]]
+ [1m[35m (109.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (100.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 6]]
+ [1m[35m (110.1ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:01:37 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.4ms)
+Completed 200 OK in 223ms (Views: 202.7ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:01:37 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:01:37 +0300
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (131.5ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (114.6ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 6], ["user_group_id", 6]]
+ [1m[35m (90.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (82.5ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 7]]
+ [1m[35m (105.8ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:02:48 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.2ms)
+Completed 200 OK in 263ms (Views: 238.8ms | ActiveRecord: 0.8ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:02:48 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:02:48 +0300
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (114.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (105.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 7], ["user_group_id", 7]]
+ [1m[35m (108.0ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (108.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 8]]
+ [1m[35m (111.1ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:03:40 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.8ms)
+Completed 200 OK in 227ms (Views: 200.6ms | ActiveRecord: 0.8ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:03:40 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:03:40 +0300
+Started GET "/oauth/yandex?code=6886944" for 127.0.0.1 at 2016-05-15 02:03:42 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"6886944", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.6ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "8bb4fb1c-9fb5-4d1a-a9cb-e0d0fac3553d"], ["id", 2]]
+ [1m[35m (108.8ms)[0m commit transaction
+Completed 200 OK in 303ms (Views: 0.6ms | ActiveRecord: 110.3ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (113.6ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (101.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 8], ["user_group_id", 8]]
+ [1m[35m (136.9ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (98.5ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 9]]
+ [1m[35m (110.6ms)[0m commit transaction
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:04:42 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.2ms)
+Completed 200 OK in 220ms (Views: 200.6ms | ActiveRecord: 0.6ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:04:42 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:04:42 +0300
+Started GET "/oauth/yandex?code=7722388" for 127.0.0.1 at 2016-05-15 02:04:45 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"7722388", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.7ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "20fc1453-b269-47fe-908d-1a2b8b00beca"], ["id", 2]]
+ [1m[35m (248.9ms)[0m commit transaction
+Completed 200 OK in 445ms (Views: 0.5ms | ActiveRecord: 250.9ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (118.9ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (89.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 9], ["user_group_id", 9]]
+ [1m[35m (90.4ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (99.6ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 10]]
+ [1m[35m (106.2ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:07:02 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (4.4ms)
+Completed 200 OK in 254ms (Views: 233.7ms | ActiveRecord: 0.6ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:07:02 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:07:02 +0300
+Started GET "/oauth/yandex?code=9767581" for 127.0.0.1 at 2016-05-15 02:07:04 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"9767581", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "2860c0c7-3240-41e9-80a7-ea5d3fee0e3e"], ["id", 2]]
+ [1m[35m (105.1ms)[0m commit transaction
+Completed 200 OK in 274ms (Views: 0.4ms | ActiveRecord: 106.9ms)
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:07:05 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.2ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (0.3ms)
+Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.4ms)
+Started GET "/oauth/yandex?code=8927795" for 127.0.0.1 at 2016-05-15 02:07:05 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"8927795", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.3ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "62299889-cf9f-4829-930a-e2502eaafa59"], ["id", 2]]
+ [1m[36m (114.0ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 300ms (Views: 0.4ms | ActiveRecord: 115.2ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (125.9ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (113.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 10], ["user_group_id", 10]]
+ [1m[35m (123.3ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (98.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 11]]
+ [1m[35m (98.7ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:10:24 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.1ms)
+Completed 200 OK in 220ms (Views: 198.7ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:10:25 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:10:25 +0300
+Started GET "/oauth/yandex?code=8831039" for 127.0.0.1 at 2016-05-15 02:10:27 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"8831039", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.6ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "cc02b7b9-4a49-4710-b97d-2c22d3b80383"], ["id", 2]]
+ [1m[35m (88.8ms)[0m commit transaction
+Completed 200 OK in 561ms (Views: 0.5ms | ActiveRecord: 90.9ms)
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:10:28 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.2ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (0.2ms)
+Completed 200 OK in 4ms (Views: 1.3ms | ActiveRecord: 0.4ms)
+Started GET "/oauth/yandex?code=9897642" for 127.0.0.1 at 2016-05-15 02:10:28 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"9897642", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.6ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "66622731-6e36-42b7-9ac8-411a3d76f7a1"], ["id", 2]]
+ [1m[36m (103.9ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 485ms (Views: 0.4ms | ActiveRecord: 105.5ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (122.1ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (99.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 11], ["user_group_id", 11]]
+ [1m[35m (92.1ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (114.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 12]]
+ [1m[35m (127.0ms)[0m commit transaction
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:19:37 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.2ms)
+Completed 200 OK in 214ms (Views: 183.2ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:19:37 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:19:37 +0300
+Started GET "/oauth/yandex?code=7441259" for 127.0.0.1 at 2016-05-15 02:19:39 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"7441259", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.5ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.3ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "83449883-3ed3-49b1-b666-2cc90c2abdd1"], ["id", 2]]
+ [1m[35m (107.2ms)[0m commit transaction
+Completed 200 OK in 460ms (Views: 0.6ms | ActiveRecord: 108.9ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (119.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (105.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 12], ["user_group_id", 12]]
+ [1m[35m (107.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (91.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 13]]
+ [1m[35m (87.7ms)[0m commit transaction
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:21:16 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.5ms)
+Completed 200 OK in 217ms (Views: 196.4ms | ActiveRecord: 0.6ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:21:16 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:21:16 +0300
+Started GET "/oauth/yandex?code=8446596" for 127.0.0.1 at 2016-05-15 02:21:18 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"8446596", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "0385f876-cec5-4574-b24a-1d798f803c63"], ["id", 2]]
+ [1m[35m (152.9ms)[0m commit transaction
+Completed 200 OK in 376ms (Views: 0.4ms | ActiveRecord: 154.7ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (127.2ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (109.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 13], ["user_group_id", 13]]
+ [1m[35m (109.3ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (98.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 14]]
+ [1m[35m (112.1ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:21:41 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.1ms)
+Completed 200 OK in 246ms (Views: 223.6ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:21:41 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:21:41 +0300
+Started GET "/oauth/yandex?code=4014967" for 127.0.0.1 at 2016-05-15 02:21:44 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"4014967", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "a5b7d5be-affb-4d51-bfe2-7cd7ecb4c73f"], ["id", 2]]
+ [1m[35m (182.0ms)[0m commit transaction
+Completed 200 OK in 434ms (Views: 0.6ms | ActiveRecord: 183.9ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+ [1m[35m (0.1ms)[0m begin transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "users" ("name") VALUES (?) [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Test"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 14], ["user_group_id", 14]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?)[0m [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "users_urls" ("url_id") VALUES (?) [["url_id", 15]]
+ [1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:31:44 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.2ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (3.4ms)
+Completed 200 OK in 223ms (Views: 200.2ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:31:44 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:31:44 +0300
+Started GET "/oauth/yandex?code=2115546" for 127.0.0.1 at 2016-05-15 02:31:46 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"2115546", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (5011.7ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "24f9b2d2-901e-4272-a3be-a167426cc03e"], ["id", 2]]
+ [1m[36m (0.3ms)[0m [1mrollback transaction[0m
+Completed 500 Internal Server Error in 5313ms (ActiveRecord: 5013.0ms)
+ [1m[35m (0.5ms)[0m rollback transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (109.5ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (109.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 14], ["user_group_id", 14]]
+ [1m[35m (115.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (84.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 15]]
+ [1m[35m (118.5ms)[0m commit transaction
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:36:23 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.2ms)
+Completed 200 OK in 236ms (Views: 214.5ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:36:23 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:36:23 +0300
+Started GET "/oauth/yandex?code=9583324" for 127.0.0.1 at 2016-05-15 02:36:25 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"9583324", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "3e15bad0-bf47-472e-8908-8ed343edd87c"], ["id", 2]]
+ [1m[35m (160.5ms)[0m commit transaction
+Completed 200 OK in 357ms (Views: 0.7ms | ActiveRecord: 162.5ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (106.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (109.3ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 15], ["user_group_id", 15]]
+ [1m[35m (90.4ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (98.3ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 16]]
+ [1m[35m (129.6ms)[0m commit transaction
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:36:42 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.1ms)
+Completed 200 OK in 254ms (Views: 232.6ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:36:43 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:36:43 +0300
+Started GET "/oauth/yandex?code=2589298" for 127.0.0.1 at 2016-05-15 02:36:45 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"2589298", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.4ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "ca77aff7-9048-440d-9dc0-73d48ef632f0"], ["id", 2]]
+ [1m[35m (112.3ms)[0m commit transaction
+Completed 200 OK in 316ms (Views: 0.3ms | ActiveRecord: 114.0ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (124.5ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (105.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 16], ["user_group_id", 16]]
+ [1m[35m (107.7ms)[0m commit transaction
+ [1m[36m (0.0ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (99.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 17]]
+ [1m[35m (101.2ms)[0m commit transaction
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:37:28 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.2ms)
+Completed 200 OK in 222ms (Views: 201.8ms | ActiveRecord: 0.6ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:37:28 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:37:28 +0300
+Started GET "/oauth/yandex?code=5642776" for 127.0.0.1 at 2016-05-15 02:37:30 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"5642776", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.5ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "a6d5ba12-85b5-4c79-b4d5-c602c9378ce3"], ["id", 2]]
+ [1m[35m (113.8ms)[0m commit transaction
+Completed 200 OK in 334ms (Views: 0.6ms | ActiveRecord: 115.5ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (116.5ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (101.3ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 17], ["user_group_id", 17]]
+ [1m[35m (89.8ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (90.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 18]]
+ [1m[35m (102.3ms)[0m commit transaction
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:37:54 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.4ms)
+Completed 200 OK in 255ms (Views: 234.5ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:37:54 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:37:54 +0300
+Started GET "/oauth/yandex?code=2268788" for 127.0.0.1 at 2016-05-15 02:37:56 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"2268788", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.5ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "b5d2e061-849f-4d2e-8a8c-91ca2fa982ab"], ["id", 2]]
+ [1m[35m (122.0ms)[0m commit transaction
+Completed 200 OK in 319ms (Views: 0.5ms | ActiveRecord: 123.6ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (118.3ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (90.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 18], ["user_group_id", 18]]
+ [1m[35m (106.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (98.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 19]]
+ [1m[35m (111.7ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:39:04 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (2.9ms)
+Completed 200 OK in 214ms (Views: 185.4ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:39:04 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:39:04 +0300
+Started GET "/oauth/yandex?code=8722432" for 127.0.0.1 at 2016-05-15 02:39:06 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"8722432", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (1.0ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "e6cbf341-abd6-4667-b7ce-1ae5e34c1e34"], ["id", 2]]
+ [1m[35m (157.1ms)[0m commit transaction
+Completed 200 OK in 497ms (Views: 0.6ms | ActiveRecord: 159.2ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (130.9ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (105.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 19], ["user_group_id", 19]]
+ [1m[35m (108.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (98.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 20]]
+ [1m[35m (110.4ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:41:24 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.4ms)
+Completed 200 OK in 226ms (Views: 199.7ms | ActiveRecord: 0.8ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:41:25 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:41:25 +0300
+Started GET "/oauth/yandex?code=9882007" for 127.0.0.1 at 2016-05-15 02:41:27 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"9882007", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.6ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "fee8e1b5-8e3c-46db-8c6c-cfba5acc211f"], ["id", 2]]
+ [1m[35m (168.4ms)[0m commit transaction
+Completed 200 OK in 396ms (Views: 0.4ms | ActiveRecord: 170.2ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (124.8ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (91.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 20], ["user_group_id", 20]]
+ [1m[35m (107.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (102.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 21]]
+ [1m[35m (110.5ms)[0m commit transaction
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:41:52 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.4ms)
+Completed 200 OK in 225ms (Views: 204.5ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:41:52 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:41:52 +0300
+Started GET "/oauth/yandex?code=7151886" for 127.0.0.1 at 2016-05-15 02:41:54 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"7151886", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.4ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "07fb82f1-152e-4846-ac10-fc82b5983b3c"], ["id", 2]]
+ [1m[35m (135.1ms)[0m commit transaction
+Completed 200 OK in 325ms (Views: 0.6ms | ActiveRecord: 136.3ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (132.9ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (91.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 21], ["user_group_id", 21]]
+ [1m[35m (101.3ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (138.6ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 22]]
+ [1m[35m (129.0ms)[0m commit transaction
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:44:03 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (2.9ms)
+Completed 200 OK in 216ms (Views: 188.3ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:44:03 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:44:03 +0300
+Started GET "/oauth/yandex?code=3193749" for 127.0.0.1 at 2016-05-15 02:44:05 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"3193749", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.5ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "362f9b17-0068-4909-9119-9b57d3378f49"], ["id", 2]]
+ [1m[35m (110.2ms)[0m commit transaction
+Completed 200 OK in 293ms (Views: 0.5ms | ActiveRecord: 111.9ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (109.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (107.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 22], ["user_group_id", 22]]
+ [1m[35m (133.5ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (98.5ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 23]]
+ [1m[35m (110.3ms)[0m commit transaction
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:46:51 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.4ms)
+Completed 200 OK in 222ms (Views: 200.6ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:46:51 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:46:51 +0300
+Started GET "/oauth/yandex?code=6000542" for 127.0.0.1 at 2016-05-15 02:46:54 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"6000542", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.5ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "fbbf5c2e-fe5d-4a26-8004-3a44ee3a6326"], ["id", 2]]
+ [1m[35m (158.1ms)[0m commit transaction
+Completed 200 OK in 372ms (Views: 0.4ms | ActiveRecord: 159.3ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (138.6ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (117.5ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 23], ["user_group_id", 23]]
+ [1m[35m (106.2ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (96.2ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 24]]
+ [1m[35m (107.6ms)[0m commit transaction
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:47:28 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.0ms)
+Completed 200 OK in 217ms (Views: 189.0ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:47:28 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:47:28 +0300
+Started GET "/oauth/yandex?code=2166335" for 127.0.0.1 at 2016-05-15 02:47:30 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"2166335", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.5ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "9632fc60-77f1-4711-b22e-487c482a6ca1"], ["id", 2]]
+ [1m[35m (125.0ms)[0m commit transaction
+Completed 200 OK in 435ms (Views: 0.6ms | ActiveRecord: 126.4ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (251.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (109.2ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 24], ["user_group_id", 24]]
+ [1m[35m (115.6ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (113.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 25]]
+ [1m[35m (122.5ms)[0m commit transaction
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:47:50 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.4ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (2.9ms)
+Completed 200 OK in 246ms (Views: 216.2ms | ActiveRecord: 1.0ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:47:51 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:47:51 +0300
+Started GET "/oauth/yandex?code=8518933" for 127.0.0.1 at 2016-05-15 02:47:53 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"8518933", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "31997ad3-f05c-4aa4-a518-2b9584552918"], ["id", 2]]
+ [1m[35m (106.3ms)[0m commit transaction
+Completed 200 OK in 415ms (Views: 0.3ms | ActiveRecord: 108.0ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (99.3ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (110.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 25], ["user_group_id", 25]]
+ [1m[35m (106.6ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (114.3ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 26]]
+ [1m[35m (112.2ms)[0m commit transaction
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:48:43 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.5ms)
+Completed 200 OK in 221ms (Views: 200.2ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:48:43 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:48:43 +0300
+Started GET "/oauth/yandex?code=4268486" for 127.0.0.1 at 2016-05-15 02:48:45 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"4268486", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.6ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "70f7d60f-e3cb-4240-9102-1a81aaa29ea9"], ["id", 2]]
+ [1m[35m (148.5ms)[0m commit transaction
+Completed 200 OK in 443ms (Views: 0.4ms | ActiveRecord: 149.9ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (110.4ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (103.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 26], ["user_group_id", 26]]
+ [1m[35m (92.6ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (83.6ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 27]]
+ [1m[35m (115.9ms)[0m commit transaction
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:51:24 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.5ms)
+Completed 200 OK in 227ms (Views: 204.1ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:51:25 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:51:25 +0300
+Started GET "/oauth/yandex?code=9341534" for 127.0.0.1 at 2016-05-15 02:51:27 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"9341534", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.3ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "462a2851-1c73-4c3f-8baf-1eab304cc9bc"], ["id", 2]]
+ [1m[35m (201.5ms)[0m commit transaction
+Completed 200 OK in 369ms (Views: 0.2ms | ActiveRecord: 202.5ms)
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (113.1ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (89.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 27], ["user_group_id", 27]]
+ [1m[35m (106.7ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (88.6ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 28]]
+ [1m[35m (111.2ms)[0m commit transaction
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:51:47 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.2ms)
+Completed 200 OK in 229ms (Views: 207.2ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:51:48 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:51:48 +0300
+Started GET "/oauth/yandex?code=2547403" for 127.0.0.1 at 2016-05-15 02:51:50 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"2547403", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.4ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "4c091aa3-28bb-4f6f-a3d6-012962b1e9e8"], ["id", 2]]
+ [1m[35m (109.7ms)[0m commit transaction
+Completed 200 OK in 365ms (Views: 0.3ms | ActiveRecord: 110.6ms)
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (115.7ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (92.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 28], ["user_group_id", 28]]
+ [1m[35m (107.7ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (124.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 29]]
+ [1m[35m (125.3ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:52:12 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.0ms)
+Completed 200 OK in 256ms (Views: 229.5ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:52:12 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:52:12 +0300
+Started GET "/oauth/yandex?code=5309577" for 127.0.0.1 at 2016-05-15 02:52:14 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"5309577", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.9ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "c1a63fd3-5303-4aae-b6b5-7ac8b3c3ac71"], ["id", 2]]
+ [1m[35m (156.5ms)[0m commit transaction
+Completed 200 OK in 344ms (Views: 0.5ms | ActiveRecord: 158.3ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (107.5ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (109.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 29], ["user_group_id", 29]]
+ [1m[35m (106.7ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (107.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 30]]
+ [1m[35m (126.7ms)[0m commit transaction
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:52:56 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.2ms)
+Completed 200 OK in 214ms (Views: 185.8ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:52:56 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:52:56 +0300
+Started GET "/oauth/yandex?code=2100039" for 127.0.0.1 at 2016-05-15 02:52:59 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"2100039", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.5ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "3db0792a-c417-47a9-bfe1-a73694c647dd"], ["id", 2]]
+ [1m[35m (100.0ms)[0m commit transaction
+Completed 200 OK in 307ms (Views: 0.6ms | ActiveRecord: 101.4ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (335.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (114.6ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 30], ["user_group_id", 30]]
+ [1m[35m (123.5ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (119.3ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 31]]
+ [1m[35m (126.6ms)[0m commit transaction
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 02:53:27 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.8ms)
+Completed 200 OK in 221ms (Views: 201.0ms | ActiveRecord: 0.8ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 02:53:28 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 02:53:28 +0300
+Started GET "/oauth/yandex?code=9880368" for 127.0.0.1 at 2016-05-15 02:53:30 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"9880368", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.7ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "445fc0eb-dbf7-4a9e-bd10-88d135a34ed8"], ["id", 2]]
+ [1m[35m (190.4ms)[0m commit transaction
+Completed 200 OK in 472ms (Views: 0.6ms | ActiveRecord: 192.5ms)
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (109.6ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (105.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 31], ["user_group_id", 31]]
+ [1m[35m (107.7ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (98.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 32]]
+ [1m[35m (106.6ms)[0m commit transaction
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users"
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (115.8ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (106.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 32], ["user_group_id", 32]]
+ [1m[35m (116.7ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (123.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 33]]
+ [1m[35m (135.3ms)[0m commit transaction
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users"
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (111.9ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (92.2ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 33], ["user_group_id", 33]]
+ [1m[35m (92.7ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (83.5ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 34]]
+ [1m[35m (102.2ms)[0m commit transaction
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users"
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (107.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (106.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 34], ["user_group_id", 34]]
+ [1m[35m (106.8ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (106.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 35]]
+ [1m[35m (118.3ms)[0m commit transaction
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users"
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (122.6ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (107.5ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 35], ["user_group_id", 35]]
+ [1m[35m (88.9ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (125.6ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 36]]
+ [1m[35m (126.3ms)[0m commit transaction
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users"
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (116.6ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (113.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 36], ["user_group_id", 36]]
+ [1m[35m (123.7ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (98.3ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 37]]
+ [1m[35m (93.8ms)[0m commit transaction
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users"
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (108.4ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (107.2ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 37], ["user_group_id", 37]]
+ [1m[35m (124.1ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (147.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 38]]
+ [1m[35m (95.0ms)[0m commit transaction
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users"[0m
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (109.7ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (107.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 38], ["user_group_id", 38]]
+ [1m[35m (90.4ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (90.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 39]]
+ [1m[35m (94.5ms)[0m commit transaction
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:09:33 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (5.2ms)
+Completed 200 OK in 243ms (Views: 203.5ms | ActiveRecord: 1.0ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 03:09:34 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 03:09:34 +0300
+Started GET "/oauth/yandex?code=8046131" for 127.0.0.1 at 2016-05-15 03:09:36 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"8046131", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.8ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "1621e374-1414-493a-b31e-3c0240f85d8d"], ["id", 2]]
+ [1m[36m (104.5ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 333ms (Views: 0.4ms | ActiveRecord: 106.5ms)
+Started GET "/test" for 127.0.0.1 at 2016-05-15 03:09:36 +0300
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users"
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (118.5ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (106.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 39], ["user_group_id", 39]]
+ [1m[35m (105.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (106.6ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 40]]
+ [1m[35m (119.4ms)[0m commit transaction
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:10:07 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.2ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (3.6ms)
+Completed 200 OK in 220ms (Views: 196.6ms | ActiveRecord: 0.8ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 03:10:08 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 03:10:08 +0300
+Started GET "/oauth/yandex?code=8116849" for 127.0.0.1 at 2016-05-15 03:10:10 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"8116849", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.7ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "6756bef1-75f8-40f3-89ce-e2af7810cf6f"], ["id", 2]]
+ [1m[36m (141.2ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 335ms (Views: 0.5ms | ActiveRecord: 142.9ms)
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (122.9ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (105.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 40], ["user_group_id", 40]]
+ [1m[35m (116.8ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (106.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 41]]
+ [1m[35m (110.3ms)[0m commit transaction
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:13:56 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.2ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (3.8ms)
+Completed 200 OK in 230ms (Views: 200.1ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 03:13:56 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 03:13:56 +0300
+Started GET "/oauth/yandex?code=2085013" for 127.0.0.1 at 2016-05-15 03:13:59 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"2085013", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.5ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "e5220b35-3dc9-4a0c-aede-1e7f389bb973"], ["id", 2]]
+ [1m[36m (179.8ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 377ms (Views: 0.3ms | ActiveRecord: 181.4ms)
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (108.8ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (122.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 41], ["user_group_id", 41]]
+ [1m[35m (109.1ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (106.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 42]]
+ [1m[35m (110.6ms)[0m commit transaction
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:15:11 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (3.5ms)
+Completed 200 OK in 280ms (Views: 237.7ms | ActiveRecord: 1.3ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 03:15:11 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 03:15:11 +0300
+Started GET "/oauth/yandex?code=1728331" for 127.0.0.1 at 2016-05-15 03:15:12 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"1728331", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.6ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "420597e4-4d54-4b77-8359-7689d13aa6cd"], ["id", 2]]
+ [1m[36m (102.7ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 298ms (Views: 0.5ms | ActiveRecord: 104.4ms)
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (120.5ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (105.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 42], ["user_group_id", 42]]
+ [1m[35m (149.7ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (106.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 43]]
+ [1m[35m (111.3ms)[0m commit transaction
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:15:51 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.3ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (6.1ms)
+Completed 200 OK in 261ms (Views: 238.3ms | ActiveRecord: 0.9ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 03:15:51 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 03:15:51 +0300
+Started GET "/oauth/yandex?code=4621708" for 127.0.0.1 at 2016-05-15 03:15:53 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"4621708", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.2ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "994b85da-6980-4061-854b-9dc162119396"], ["id", 2]]
+ [1m[36m (112.7ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 356ms (Views: 0.5ms | ActiveRecord: 113.8ms)
+Started GET "/test" for 127.0.0.1 at 2016-05-15 03:15:53 +0300
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users"
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (123.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (123.2ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 43], ["user_group_id", 43]]
+ [1m[35m (125.2ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (122.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 44]]
+ [1m[35m (125.7ms)[0m commit transaction
+ [1m[36mUser Load (0.7ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:17:10 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.3ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (7.0ms)
+Completed 200 OK in 246ms (Views: 224.3ms | ActiveRecord: 0.8ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 03:17:10 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 03:17:10 +0300
+Started GET "/oauth/yandex?code=7423307" for 127.0.0.1 at 2016-05-15 03:17:11 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"7423307", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.3ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "1dcbd53a-4e77-44ca-bb4f-05eaeeee52b5"], ["id", 2]]
+ [1m[36m (116.0ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 315ms (Views: 0.3ms | ActiveRecord: 117.3ms)
+Started GET "/test" for 127.0.0.1 at 2016-05-15 03:17:11 +0300
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:17:11 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.5ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (0.4ms)
+Completed 200 OK in 9ms (Views: 3.6ms | ActiveRecord: 0.7ms)
+Started GET "/oauth/yandex?code=7719646" for 127.0.0.1 at 2016-05-15 03:17:12 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"7719646", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.9ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "da51100f-17c4-49f8-b066-f301233fac8d"], ["id", 2]]
+ [1m[35m (106.6ms)[0m commit transaction
+Completed 200 OK in 313ms (Views: 0.4ms | ActiveRecord: 108.5ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (136.7ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (106.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 44], ["user_group_id", 44]]
+ [1m[35m (116.5ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (142.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 45]]
+ [1m[35m (111.4ms)[0m commit transaction
+ [1m[36mUser Load (0.7ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:18:13 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.2ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (6.3ms)
+Completed 200 OK in 241ms (Views: 222.7ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 03:18:14 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 03:18:14 +0300
+Started GET "/oauth/yandex?code=7052572" for 127.0.0.1 at 2016-05-15 03:18:15 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"7052572", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.3ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "7116d824-3539-474c-b07c-7c829a87cb93"], ["id", 2]]
+ [1m[36m (107.5ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 331ms (Views: 0.5ms | ActiveRecord: 109.0ms)
+Started GET "/test" for 127.0.0.1 at 2016-05-15 03:18:15 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+Filter chain halted as :check_access rendered or redirected
+Completed 403 Forbidden in 8ms (Views: 0.5ms | ActiveRecord: 0.7ms)
+ [1m[35mUser Load (0.8ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:18:15 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.9ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (0.6ms)
+Completed 200 OK in 11ms (Views: 4.4ms | ActiveRecord: 1.1ms)
+Started GET "/oauth/yandex?code=4340303" for 127.0.0.1 at 2016-05-15 03:18:15 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"4340303", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "2ca82392-5dd8-4f67-8516-27f934ccd3a1"], ["id", 2]]
+ [1m[35m (112.4ms)[0m commit transaction
+Completed 200 OK in 303ms (Views: 0.4ms | ActiveRecord: 114.3ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (127.4ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (131.5ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 45], ["user_group_id", 45]]
+ [1m[35m (108.4ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (107.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 46]]
+ [1m[35m (111.2ms)[0m commit transaction
+ [1m[36mUser Load (0.7ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:18:51 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (2.4ms)
+Completed 200 OK in 253ms (Views: 222.1ms | ActiveRecord: 1.1ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 03:18:51 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 03:18:51 +0300
+Started GET "/oauth/yandex?code=1610379" for 127.0.0.1 at 2016-05-15 03:18:52 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"1610379", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "fe59af05-8603-4f32-81d6-ad08bb360cf0"], ["id", 2]]
+ [1m[36m (110.6ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 268ms (Views: 0.2ms | ActiveRecord: 112.0ms)
+Started GET "/test" for 127.0.0.1 at 2016-05-15 03:18:53 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.8ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+Filter chain halted as :check_access rendered or redirected
+Completed 403 Forbidden in 8ms (Views: 0.5ms | ActiveRecord: 1.0ms)
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:18:53 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.6ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (0.4ms)
+Completed 200 OK in 10ms (Views: 2.7ms | ActiveRecord: 0.8ms)
+Started GET "/oauth/yandex?code=6491908" for 127.0.0.1 at 2016-05-15 03:18:53 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"6491908", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "983c5fbc-76a1-421e-9a44-147de0061792"], ["id", 2]]
+ [1m[35m (121.8ms)[0m commit transaction
+Completed 200 OK in 303ms (Views: 0.4ms | ActiveRecord: 123.2ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (120.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (116.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 46], ["user_group_id", 46]]
+ [1m[35m (115.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (106.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 47]]
+ [1m[35m (109.7ms)[0m commit transaction
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:19:17 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.2ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (6.0ms)
+Completed 200 OK in 231ms (Views: 213.0ms | ActiveRecord: 0.6ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 03:19:17 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 03:19:17 +0300
+Started GET "/oauth/yandex?code=8870929" for 127.0.0.1 at 2016-05-15 03:19:18 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"8870929", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.5ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "f6936851-d2de-4a4c-8de4-c9967e2ae2a6"], ["id", 2]]
+ [1m[36m (132.8ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 443ms (Views: 0.6ms | ActiveRecord: 134.4ms)
+Started GET "/test" for 127.0.0.1 at 2016-05-15 03:19:19 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+Filter chain halted as :check_access rendered or redirected
+Completed 403 Forbidden in 8ms (Views: 0.2ms | ActiveRecord: 0.7ms)
+ [1m[35mUser Load (0.7ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:19:19 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.7ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (0.6ms)
+Completed 200 OK in 13ms (Views: 3.5ms | ActiveRecord: 1.0ms)
+Started GET "/oauth/yandex?code=9490020" for 127.0.0.1 at 2016-05-15 03:19:19 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"9490020", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.6ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "dd5ea46a-25e3-43e6-a39a-e02099ad650e"], ["id", 2]]
+ [1m[35m (110.6ms)[0m commit transaction
+Completed 200 OK in 302ms (Views: 0.4ms | ActiveRecord: 112.0ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (107.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (108.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 47], ["user_group_id", 47]]
+ [1m[35m (107.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (107.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 48]]
+ [1m[35m (120.6ms)[0m commit transaction
+ [1m[36mUser Load (0.7ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:20:02 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.3ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (6.9ms)
+Completed 200 OK in 248ms (Views: 227.4ms | ActiveRecord: 0.8ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 03:20:02 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 03:20:02 +0300
+Started GET "/oauth/yandex?code=5323407" for 127.0.0.1 at 2016-05-15 03:20:03 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"5323407", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "bf92d757-9b16-486b-923f-3ccb053d3876"], ["id", 2]]
+ [1m[36m (105.0ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 320ms (Views: 0.3ms | ActiveRecord: 106.2ms)
+Started GET "/test" for 127.0.0.1 at 2016-05-15 03:20:03 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "bf92d757-9b16-486b-923f-3ccb053d3876"]]
+ [1m[36mSQL (0.5ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2[0m
+Filter chain halted as :check_access rendered or redirected
+Completed 401 Unauthorized in 7ms (Views: 0.3ms | ActiveRecord: 0.9ms)
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:20:04 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "bf92d757-9b16-486b-923f-3ccb053d3876"]]
+ [1m[35mSQL (0.6ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Filter chain halted as :check_access rendered or redirected
+Completed 401 Unauthorized in 7ms (Views: 0.4ms | ActiveRecord: 0.8ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (134.7ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (91.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 48], ["user_group_id", 48]]
+ [1m[35m (110.1ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (108.3ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 49]]
+ [1m[35m (120.5ms)[0m commit transaction
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:21:07 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.2ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (6.5ms)
+Completed 200 OK in 247ms (Views: 226.7ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 03:21:08 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 03:21:08 +0300
+Started GET "/oauth/yandex?code=8990768" for 127.0.0.1 at 2016-05-15 03:21:09 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"8990768", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "4b8edb6c-66fb-4cbc-a376-8dcc2cd37ae2"], ["id", 2]]
+ [1m[36m (116.3ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 329ms (Views: 0.5ms | ActiveRecord: 117.7ms)
+Started GET "/test" for 127.0.0.1 at 2016-05-15 03:21:09 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "4b8edb6c-66fb-4cbc-a376-8dcc2cd37ae2"]]
+ [1m[36mSQL (0.3ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2[0m
+Filter chain halted as :check_access rendered or redirected
+Completed 401 Unauthorized in 4ms (Views: 0.2ms | ActiveRecord: 0.6ms)
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:21:09 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "4b8edb6c-66fb-4cbc-a376-8dcc2cd37ae2"]]
+ [1m[35mSQL (0.4ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Filter chain halted as :check_access rendered or redirected
+Completed 401 Unauthorized in 4ms (Views: 0.3ms | ActiveRecord: 0.6ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (109.6ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (116.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 49], ["user_group_id", 49]]
+ [1m[35m (132.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (106.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 50]]
+ [1m[35m (106.9ms)[0m commit transaction
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:22:01 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.2ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (2.2ms)
+Completed 200 OK in 230ms (Views: 203.4ms | ActiveRecord: 0.8ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 03:22:01 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 03:22:01 +0300
+Started GET "/oauth/yandex?code=4064616" for 127.0.0.1 at 2016-05-15 03:22:02 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"4064616", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.8ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "71425d74-cc58-4d72-ba54-33aba9245907"], ["id", 2]]
+ [1m[36m (113.2ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 299ms (Views: 0.5ms | ActiveRecord: 114.9ms)
+Started GET "/test" for 127.0.0.1 at 2016-05-15 03:22:03 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "71425d74-cc58-4d72-ba54-33aba9245907"]]
+ [1m[36mSQL (0.6ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2[0m
+Filter chain halted as :check_access rendered or redirected
+Completed 401 Unauthorized in 7ms (Views: 0.3ms | ActiveRecord: 1.0ms)
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:22:03 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "71425d74-cc58-4d72-ba54-33aba9245907"]]
+ [1m[35mSQL (0.6ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Filter chain halted as :check_access rendered or redirected
+Completed 401 Unauthorized in 5ms (Views: 0.3ms | ActiveRecord: 0.8ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (115.5ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (115.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 50], ["user_group_id", 50]]
+ [1m[35m (124.3ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (106.6ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 51]]
+ [1m[35m (104.2ms)[0m commit transaction
+ [1m[36mUser Load (0.7ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:23:56 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mUrl Load (0.3ms)[0m [1mSELECT "urls".* FROM "urls"[0m
+ [1m[35mSQL (0.3ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (2.3ms)
+Completed 200 OK in 252ms (Views: 220.5ms | ActiveRecord: 1.1ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 03:23:56 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 03:23:56 +0300
+Started GET "/oauth/yandex?code=8817339" for 127.0.0.1 at 2016-05-15 03:23:57 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"8817339", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mUrl Load (0.6ms)[0m SELECT "urls".* FROM "urls"
+ [1m[36mSQL (0.6ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "cf9fbe3c-6e10-435b-b95b-4ab8749fbd57"], ["id", 2]]
+ [1m[36m (120.1ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 299ms (Views: 0.5ms | ActiveRecord: 122.5ms)
+Started GET "/test" for 127.0.0.1 at 2016-05-15 03:23:58 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "cf9fbe3c-6e10-435b-b95b-4ab8749fbd57"]]
+ [1m[36mUrl Load (0.4ms)[0m [1mSELECT "urls".* FROM "urls"[0m
+ [1m[35mSQL (0.4ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Filter chain halted as :check_access rendered or redirected
+Completed 401 Unauthorized in 8ms (Views: 0.2ms | ActiveRecord: 1.3ms)
+ [1m[36mUser Load (0.8ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:23:58 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "cf9fbe3c-6e10-435b-b95b-4ab8749fbd57"]]
+ [1m[36mUrl Load (0.4ms)[0m [1mSELECT "urls".* FROM "urls"[0m
+ [1m[35mSQL (0.6ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Filter chain halted as :check_access rendered or redirected
+Completed 401 Unauthorized in 10ms (Views: 0.3ms | ActiveRecord: 1.3ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (136.8ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (105.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 51], ["user_group_id", 51]]
+ [1m[35m (107.2ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (106.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 52]]
+ [1m[35m (110.1ms)[0m commit transaction
+ [1m[36mUser Load (0.7ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:24:41 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.3ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (7.8ms)
+Completed 200 OK in 243ms (Views: 220.5ms | ActiveRecord: 0.9ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 03:24:41 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 03:24:41 +0300
+Started GET "/oauth/yandex?code=2424074" for 127.0.0.1 at 2016-05-15 03:24:43 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"2424074", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.3ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "a048d043-fd0d-4ed3-a159-37ea88aa1428"], ["id", 2]]
+ [1m[36m (108.7ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 288ms (Views: 0.2ms | ActiveRecord: 109.6ms)
+Started GET "/test" for 127.0.0.1 at 2016-05-15 03:24:43 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "a048d043-fd0d-4ed3-a159-37ea88aa1428"]]
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "a048d043-fd0d-4ed3-a159-37ea88aa1428"]]
+ [1m[35mSQL (0.4ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Filter chain halted as :check_access rendered or redirected
+Completed 401 Unauthorized in 5ms (Views: 0.2ms | ActiveRecord: 0.7ms)
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:24:43 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "a048d043-fd0d-4ed3-a159-37ea88aa1428"]]
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "a048d043-fd0d-4ed3-a159-37ea88aa1428"]]
+ [1m[35mSQL (1.1ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Filter chain halted as :check_access rendered or redirected
+Completed 401 Unauthorized in 6ms (Views: 0.3ms | ActiveRecord: 1.3ms)
+ [1m[36mUrl Load (0.8ms)[0m [1mSELECT "urls".* FROM "urls"[0m
+ [1m[36m (88.3ms)[0m [1mCREATE TABLE "urls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "url_pattern" varchar, "name" varchar, "http_method" varchar) [0m
+ [1m[35m (114.7ms)[0m CREATE TABLE "user_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
+ [1m[36m (0.3ms)[0m [1mselect sqlite_version(*)[0m
+ [1m[35m (98.7ms)[0m CREATE INDEX "index_user_groups_on_name" ON "user_groups" ("name")
+ [1m[36m (98.2ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "api_code" varchar) [0m
+ [1m[35m (98.5ms)[0m CREATE INDEX "index_users_on_name" ON "users" ("name")
+ [1m[36m (107.7ms)[0m [1mCREATE TABLE "users_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_group_id" integer, "user_id" integer) [0m
+ [1m[35m (131.8ms)[0m CREATE TABLE "users_urls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "users_group_id" integer, "url_id" integer)
+ [1m[36m (104.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
+ [1m[35m (106.9ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
+ [1m[36m (0.3ms)[0m [1mSELECT version FROM "schema_migrations"[0m
+ [1m[35m (106.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160514163909')
+ [1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (83.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (98.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 1], ["user_group_id", 1]]
+ [1m[35m (102.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (96.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 1]]
+ [1m[35m (138.1ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:27:23 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+Completed 500 Internal Server Error in 5ms (ActiveRecord: 0.2ms)
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name", "id") VALUES (?, ?)[0m [["name", "guest"], ["id", 1]]
+ [1m[35m (0.0ms)[0m rollback transaction
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (108.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (98.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 2]]
+ [1m[35m (98.8ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (100.2ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 2]]
+ [1m[35m (120.2ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:28:16 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.3ms)
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (114.4ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (115.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 3], ["user_group_id", 3]]
+ [1m[35m (115.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (102.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id") VALUES (?)[0m [["url_id", 3]]
+ [1m[35m (121.0ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:28:54 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.3ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (121.1ms)[0m [1mCREATE TABLE "urls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "url_pattern" varchar, "name" varchar, "http_method" varchar) [0m
+ [1m[35m (106.4ms)[0m CREATE TABLE "user_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
+ [1m[36m (0.3ms)[0m [1mselect sqlite_version(*)[0m
+ [1m[35m (98.5ms)[0m CREATE INDEX "index_user_groups_on_name" ON "user_groups" ("name")
+ [1m[36m (98.7ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "api_code" varchar) [0m
+ [1m[35m (98.5ms)[0m CREATE INDEX "index_users_on_name" ON "users" ("name")
+ [1m[36m (108.1ms)[0m [1mCREATE TABLE "users_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_group_id" integer, "user_id" integer) [0m
+ [1m[35m (98.7ms)[0m CREATE TABLE "users_urls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "users_group_id" integer, "url_id" integer)
+ [1m[36m (104.6ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
+ [1m[35m (123.2ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
+ [1m[36m (0.3ms)[0m [1mSELECT version FROM "schema_migrations"[0m
+ [1m[35m (82.2ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160514163909')
+ [1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("name", "id") VALUES (?, ?)[0m [["name", "guest"], ["id", 1]]
+ [1m[35m (96.5ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[36m (99.3ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[35m (96.0ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("id", "name") VALUES (?, ?) [["id", 1], ["name", "Guest"]]
+ [1m[36m (97.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[35m (99.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[36m (111.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[35m (112.5ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("name") VALUES (?) [["name", "bar555@yandex.ru"]]
+ [1m[36m (120.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Test"]]
+ [1m[35m (104.0ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 2], ["user_group_id", 2]]
+ [1m[36m (103.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?)[0m [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[35m (103.5ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users_urls" ("url_id") VALUES (?) [["url_id", 3]]
+ [1m[36m (104.0ms)[0m [1mcommit transaction[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:30:01 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.2ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (2.3ms)
+Completed 200 OK in 228ms (Views: 202.1ms | ActiveRecord: 0.8ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 03:30:02 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 03:30:02 +0300
+Started GET "/oauth/yandex?code=6369025" for 127.0.0.1 at 2016-05-15 03:30:03 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"6369025", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.7ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "bcf3a1bc-c5dd-48cd-8b94-985373ffd352"], ["id", 2]]
+ [1m[35m (108.7ms)[0m commit transaction
+Completed 200 OK in 302ms (Views: 0.2ms | ActiveRecord: 110.3ms)
+Started GET "/test" for 127.0.0.1 at 2016-05-15 03:30:03 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "bcf3a1bc-c5dd-48cd-8b94-985373ffd352"]]
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "bcf3a1bc-c5dd-48cd-8b94-985373ffd352"]]
+ [1m[36mSQL (0.5ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2[0m
+Filter chain halted as :check_access rendered or redirected
+Completed 401 Unauthorized in 8ms (Views: 0.4ms | ActiveRecord: 1.0ms)
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:30:03 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "bcf3a1bc-c5dd-48cd-8b94-985373ffd352"]]
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "bcf3a1bc-c5dd-48cd-8b94-985373ffd352"]]
+ [1m[36mSQL (0.5ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2[0m
+Filter chain halted as :check_access rendered or redirected
+Completed 401 Unauthorized in 5ms (Views: 0.3ms | ActiveRecord: 0.7ms)
+ [1m[36m (90.9ms)[0m [1mCREATE TABLE "urls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "url_pattern" varchar, "name" varchar, "http_method" varchar) [0m
+ [1m[35m (90.6ms)[0m CREATE TABLE "user_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
+ [1m[36m (0.2ms)[0m [1mselect sqlite_version(*)[0m
+ [1m[35m (106.9ms)[0m CREATE INDEX "index_user_groups_on_name" ON "user_groups" ("name")
+ [1m[36m (98.6ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "api_code" varchar) [0m
+ [1m[35m (98.8ms)[0m CREATE INDEX "index_users_on_name" ON "users" ("name")
+ [1m[36m (107.7ms)[0m [1mCREATE TABLE "users_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_group_id" integer, "user_id" integer) [0m
+ [1m[35m (82.1ms)[0m CREATE TABLE "users_urls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "users_group_id" integer, "url_id" integer)
+ [1m[36m (96.3ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
+ [1m[35m (74.0ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
+ [1m[36m (0.3ms)[0m [1mSELECT version FROM "schema_migrations"[0m
+ [1m[35m (82.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160514163909')
+ [1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:36:56 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+Completed 500 Internal Server Error in 13ms (ActiveRecord: 0.5ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name", "id") VALUES (?, ?)[0m [["name", "guest"], ["id", 1]]
+ [1m[35m (99.0ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[36m (87.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[35m (96.8ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("id", "name") VALUES (?, ?) [["id", 1], ["name", "Guest"]]
+ [1m[36m (97.2ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[35m (98.1ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[36m (102.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[35m (96.9ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("name") VALUES (?) [["name", "bar555@yandex.ru"]]
+ [1m[36m (89.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Test"]]
+ [1m[35m (104.3ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 2], ["user_group_id", 2]]
+ [1m[36m (88.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?)[0m [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[35m (103.6ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users_urls" ("url_id", "users_group_id") VALUES (?, ?) [["url_id", 3], ["users_group_id", 2]]
+ [1m[36m (96.2ms)[0m [1mcommit transaction[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:37:20 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.3ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (8.4ms)
+Completed 200 OK in 263ms (Views: 225.0ms | ActiveRecord: 1.3ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 03:37:20 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 03:37:20 +0300
+Started GET "/oauth/yandex?code=6568553" for 127.0.0.1 at 2016-05-15 03:37:21 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"6568553", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.7ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "efc71b3d-6f74-4508-9b29-5c906edc1ebe"], ["id", 2]]
+ [1m[35m (119.9ms)[0m commit transaction
+Completed 200 OK in 344ms (Views: 0.4ms | ActiveRecord: 121.8ms)
+Started GET "/test" for 127.0.0.1 at 2016-05-15 03:37:22 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "efc71b3d-6f74-4508-9b29-5c906edc1ebe"]]
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "efc71b3d-6f74-4508-9b29-5c906edc1ebe"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2[0m
+Completed 200 OK in 6ms (Views: 0.2ms | ActiveRecord: 0.7ms)
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 03:37:22 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "efc71b3d-6f74-4508-9b29-5c906edc1ebe"]]
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "efc71b3d-6f74-4508-9b29-5c906edc1ebe"]]
+ [1m[36mSQL (0.5ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2[0m
+Filter chain halted as :check_access rendered or redirected
+Completed 401 Unauthorized in 7ms (Views: 0.3ms | ActiveRecord: 0.9ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name", "id") VALUES (?, ?)[0m [["name", "guest"], ["id", 1]]
+ [1m[35m (0.0ms)[0m rollback transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (115.4ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (90.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 3], ["user_group_id", 3]]
+ [1m[35m (103.3ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (124.3ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id", "users_group_id") VALUES (?, ?)[0m [["url_id", 4], ["users_group_id", 3]]
+ [1m[35m (102.4ms)[0m commit transaction
+Started GET "/login" for 127.0.0.1 at 2016-05-15 17:09:02 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.2ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (2.2ms)
+Completed 200 OK in 234ms (Views: 214.6ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 17:09:03 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 17:09:03 +0300
+Started GET "/oauth/yandex?code=1569140" for 127.0.0.1 at 2016-05-15 17:09:04 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"1569140", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "03285d19-25a7-4925-96be-8c4261282b07"], ["id", 2]]
+ [1m[35m (136.6ms)[0m commit transaction
+Completed 200 OK in 315ms (Views: 0.4ms | ActiveRecord: 138.7ms)
+Started GET "/test" for 127.0.0.1 at 2016-05-15 17:09:05 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "03285d19-25a7-4925-96be-8c4261282b07"]]
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "03285d19-25a7-4925-96be-8c4261282b07"]]
+ [1m[36mSQL (0.5ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2[0m
+Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 0.9ms)
+Started GET "/login" for 127.0.0.1 at 2016-05-15 17:09:05 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "03285d19-25a7-4925-96be-8c4261282b07"]]
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "03285d19-25a7-4925-96be-8c4261282b07"]]
+ [1m[35mSQL (0.5ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Filter chain halted as :check_access rendered or redirected
+Completed 401 Unauthorized in 6ms (Views: 0.3ms | ActiveRecord: 0.7ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (81.8ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (105.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 4], ["user_group_id", 4]]
+ [1m[35m (106.7ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (97.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id", "users_group_id") VALUES (?, ?)[0m [["url_id", 5], ["users_group_id", 4]]
+ [1m[35m (97.6ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 17:09:29 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.4ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.3ms)
+Completed 200 OK in 251ms (Views: 205.2ms | ActiveRecord: 1.3ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 17:09:29 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 17:09:29 +0300
+Started GET "/oauth/yandex?code=6299451" for 127.0.0.1 at 2016-05-15 17:09:30 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"6299451", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.7ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "c0111f37-9332-4c99-9674-e8f22678e44b"], ["id", 2]]
+ [1m[36m (152.3ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 515ms (Views: 0.4ms | ActiveRecord: 154.2ms)
+Started GET "/test" for 127.0.0.1 at 2016-05-15 17:09:31 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "c0111f37-9332-4c99-9674-e8f22678e44b"]]
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "c0111f37-9332-4c99-9674-e8f22678e44b"]]
+ [1m[35mSQL (0.4ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 0.8ms)
+Started GET "/login" for 127.0.0.1 at 2016-05-15 17:09:31 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "c0111f37-9332-4c99-9674-e8f22678e44b"]]
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "c0111f37-9332-4c99-9674-e8f22678e44b"]]
+ [1m[36mSQL (0.7ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2[0m
+Filter chain halted as :check_access rendered or redirected
+Completed 401 Unauthorized in 7ms (Views: 0.4ms | ActiveRecord: 1.0ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (95.4ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (101.2ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 5], ["user_group_id", 5]]
+ [1m[35m (93.8ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (88.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id", "users_group_id") VALUES (?, ?)[0m [["url_id", 6], ["users_group_id", 5]]
+ [1m[35m (113.7ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (92.3ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (90.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 6], ["user_group_id", 6]]
+ [1m[35m (91.9ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (99.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id", "users_group_id") VALUES (?, ?)[0m [["url_id", 7], ["users_group_id", 6]]
+ [1m[35m (114.0ms)[0m commit transaction
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 17:16:11 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.4ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.0ms)
+Completed 200 OK in 255ms (Views: 214.8ms | ActiveRecord: 1.2ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 17:16:11 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 17:16:11 +0300
+Started GET "/oauth/yandex?code=2393644" for 127.0.0.1 at 2016-05-15 17:16:12 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"2393644", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.5ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "e459cb15-f1f6-4e91-a603-6ad531c7954d"], ["id", 2]]
+ [1m[36m (119.6ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 495ms (Views: 0.5ms | ActiveRecord: 121.2ms)
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 17:16:13 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "e459cb15-f1f6-4e91-a603-6ad531c7954d"]]
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "e459cb15-f1f6-4e91-a603-6ad531c7954d"]]
+ [1m[36mSQL (0.5ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2[0m
+Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 0.9ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (110.3ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (89.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 7], ["user_group_id", 7]]
+ [1m[35m (93.7ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (91.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id", "users_group_id") VALUES (?, ?)[0m [["url_id", 8], ["users_group_id", 7]]
+ [1m[35m (102.9ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 17:17:18 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (2.3ms)
+Completed 200 OK in 228ms (Views: 198.9ms | ActiveRecord: 0.8ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 17:17:18 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 17:17:18 +0300
+Started GET "/oauth/yandex?code=1485591" for 127.0.0.1 at 2016-05-15 17:17:20 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"1485591", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "bf281365-d29e-48d9-b29a-079ad3124906"], ["id", 2]]
+ [1m[36m (86.5ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 306ms (Views: 0.4ms | ActiveRecord: 88.0ms)
+ [1m[35mUser Load (0.7ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 17:17:20 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "bf281365-d29e-48d9-b29a-079ad3124906"]]
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "bf281365-d29e-48d9-b29a-079ad3124906"]]
+ [1m[36mSQL (0.3ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2[0m
+Completed 200 OK in 4ms (Views: 0.2ms | ActiveRecord: 0.6ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (134.9ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (116.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 8], ["user_group_id", 8]]
+ [1m[35m (106.8ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (115.2ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id", "users_group_id") VALUES (?, ?)[0m [["url_id", 9], ["users_group_id", 8]]
+ [1m[35m (101.9ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 17:18:26 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.3ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (4.2ms)
+Completed 200 OK in 265ms (Views: 217.7ms | ActiveRecord: 1.2ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 17:18:26 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 17:18:26 +0300
+Started GET "/oauth/yandex?code=7401349" for 127.0.0.1 at 2016-05-15 17:18:28 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"7401349", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.6ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "6da5edad-2447-47b1-a201-e5949c99d365"], ["id", 2]]
+ [1m[36m (90.5ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 306ms (Views: 0.5ms | ActiveRecord: 92.2ms)
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 17:18:28 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "6da5edad-2447-47b1-a201-e5949c99d365"]]
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "6da5edad-2447-47b1-a201-e5949c99d365"]]
+ [1m[36mSQL (0.5ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2[0m
+Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 1.0ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (93.4ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (81.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 9], ["user_group_id", 9]]
+ [1m[35m (99.1ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (103.2ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id", "users_group_id") VALUES (?, ?)[0m [["url_id", 10], ["users_group_id", 9]]
+ [1m[35m (102.1ms)[0m commit transaction
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 17:22:26 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.4ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.2ms)
+Completed 200 OK in 256ms (Views: 208.2ms | ActiveRecord: 1.4ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 17:22:26 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 17:22:26 +0300
+Started GET "/oauth/yandex?code=3369838" for 127.0.0.1 at 2016-05-15 17:22:28 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"3369838", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.2ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "b937c860-cac6-4390-9304-96956a51c9cd"], ["id", 2]]
+ [1m[36m (100.4ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 279ms (Views: 0.5ms | ActiveRecord: 101.5ms)
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 17:22:28 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "b937c860-cac6-4390-9304-96956a51c9cd"]]
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "b937c860-cac6-4390-9304-96956a51c9cd"]]
+ [1m[36mSQL (0.6ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2[0m
+Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 1.1ms)
+Started GET "/logout" for 127.0.0.1 at 2016-05-15 17:22:28 +0300
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (95.8ms)[0m [1mCREATE TABLE "urls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "url_pattern" varchar, "name" varchar, "http_method" varchar) [0m
+ [1m[35m (98.7ms)[0m CREATE TABLE "user_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
+ [1m[36m (0.2ms)[0m [1mselect sqlite_version(*)[0m
+ [1m[35m (98.1ms)[0m CREATE INDEX "index_user_groups_on_name" ON "user_groups" ("name")
+ [1m[36m (98.3ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "api_code" varchar) [0m
+ [1m[35m (123.5ms)[0m CREATE INDEX "index_users_on_name" ON "users" ("name")
+ [1m[36m (124.3ms)[0m [1mCREATE TABLE "users_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_group_id" integer, "user_id" integer) [0m
+ [1m[35m (115.3ms)[0m CREATE TABLE "users_urls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "users_group_id" integer, "url_id" integer)
+ [1m[36m (121.2ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
+ [1m[35m (98.3ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
+ [1m[36m (0.3ms)[0m [1mSELECT version FROM "schema_migrations"[0m
+ [1m[35m (98.7ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160514163909')
+ [1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("name", "id") VALUES (?, ?)[0m [["name", "guest"], ["id", 1]]
+ [1m[35m (114.1ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?) [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"], ["id", 1]]
+ [1m[36m (90.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method", "id") VALUES (?, ?, ?, ?)[0m [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"], ["id", 2]]
+ [1m[35m (146.4ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "user_groups" ("id", "name") VALUES (?, ?) [["id", 1], ["name", "Guest"]]
+ [1m[36m (110.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("id", "user_id", "user_group_id") VALUES (?, ?, ?)[0m [["id", 1], ["user_id", 1], ["user_group_id", 1]]
+ [1m[35m (98.8ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?) [["id", 1], ["url_id", 1], ["users_group_id", 1]]
+ [1m[36m (104.2ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.3ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("id", "url_id", "users_group_id") VALUES (?, ?, ?)[0m [["id", 2], ["url_id", 2], ["users_group_id", 1]]
+ [1m[35m (104.3ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("name") VALUES (?) [["name", "bar555@yandex.ru"]]
+ [1m[36m (95.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Test"]]
+ [1m[35m (104.1ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 2], ["user_group_id", 2]]
+ [1m[36m (95.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.3ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?)[0m [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[35m (95.5ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users_urls" ("url_id", "users_group_id") VALUES (?, ?) [["url_id", 3], ["users_group_id", 2]]
+ [1m[36m (103.8ms)[0m [1mcommit transaction[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users"
+Started GET "/login" for 127.0.0.1 at 2016-05-15 17:23:28 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.2ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (7.5ms)
+Completed 200 OK in 232ms (Views: 209.3ms | ActiveRecord: 0.8ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 17:23:28 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 17:23:28 +0300
+Started GET "/oauth/yandex?code=5106311" for 127.0.0.1 at 2016-05-15 17:23:29 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"5106311", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.3ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "706255cd-0d4f-4cb1-ae95-150151952f43"], ["id", 2]]
+ [1m[35m (93.3ms)[0m commit transaction
+Completed 200 OK in 267ms (Views: 0.5ms | ActiveRecord: 94.7ms)
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 17:23:29 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "706255cd-0d4f-4cb1-ae95-150151952f43"]]
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "706255cd-0d4f-4cb1-ae95-150151952f43"]]
+ [1m[35mSQL (0.4ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 6ms (Views: 0.2ms | ActiveRecord: 0.8ms)
+Started GET "/logout" for 127.0.0.1 at 2016-05-15 17:23:30 +0300
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (98.7ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "user_groups" ("name") VALUES (?) [["name", "Test"]]
+ [1m[36m (97.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 3], ["user_group_id", 3]]
+ [1m[35m (98.6ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (99.3ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id", "users_group_id") VALUES (?, ?)[0m [["url_id", 4], ["users_group_id", 3]]
+ [1m[35m (104.0ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 17:24:59 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.3ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.3ms)
+Completed 200 OK in 257ms (Views: 217.6ms | ActiveRecord: 1.2ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 17:24:59 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 17:24:59 +0300
+Started GET "/oauth/yandex?code=9100043" for 127.0.0.1 at 2016-05-15 17:25:00 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"9100043", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.3ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "cda05035-2eda-4882-981d-179f28230488"], ["id", 2]]
+ [1m[36m (99.1ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 281ms (Views: 0.3ms | ActiveRecord: 100.4ms)
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 17:25:01 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "cda05035-2eda-4882-981d-179f28230488"]]
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "cda05035-2eda-4882-981d-179f28230488"]]
+ [1m[36mSQL (0.6ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2[0m
+Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 1.0ms)
+Started GET "/login/logout" for 127.0.0.1 at 2016-05-15 17:25:01 +0300
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "guest"]]
+ [1m[35m (102.9ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"]]
+ [1m[36m (101.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?)[0m [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"]]
+ [1m[35m (97.2ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login/logout"], ["name", "Logout page"], ["http_method", "GET"]]
+ [1m[36m (95.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Guest"]]
+ [1m[35m (99.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 4], ["user_group_id", 4]]
+ [1m[36m (98.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("users_group_id") VALUES (?)[0m [["users_group_id", 4]]
+ [1m[35m (85.0ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_urls" ("users_group_id") VALUES (?) [["users_group_id", 4]]
+ [1m[36m (96.6ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("users_group_id") VALUES (?)[0m [["users_group_id", 4]]
+ [1m[35m (96.0ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("name") VALUES (?) [["name", "bar555@yandex.ru"]]
+ [1m[36m (129.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Test"]]
+ [1m[35m (103.9ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 5], ["user_group_id", 5]]
+ [1m[36m (95.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 5], ["user_group_id", 4]]
+ [1m[35m (96.0ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (138.2ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id", "users_group_id") VALUES (?, ?)[0m [["url_id", 8], ["users_group_id", 5]]
+ [1m[35m (96.5ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "guest"]]
+ [1m[35m (109.5ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"]]
+ [1m[36m (102.2ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?)[0m [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"]]
+ [1m[35m (88.8ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login/logout"], ["name", "Logout page"], ["http_method", "GET"]]
+ [1m[36m (97.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Guest"]]
+ [1m[35m (98.8ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 6], ["user_group_id", 6]]
+ [1m[36m (98.3ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("users_group_id") VALUES (?)[0m [["users_group_id", 7]]
+ [1m[35m (105.4ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "users_urls" ("users_group_id") VALUES (?) [["users_group_id", 7]]
+ [1m[36m (96.6ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("users_group_id") VALUES (?)[0m [["users_group_id", 7]]
+ [1m[35m (96.6ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("name") VALUES (?) [["name", "bar555@yandex.ru"]]
+ [1m[36m (96.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Test"]]
+ [1m[35m (95.8ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 7], ["user_group_id", 7]]
+ [1m[36m (128.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 7], ["user_group_id", 6]]
+ [1m[35m (88.4ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (112.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id", "users_group_id") VALUES (?, ?)[0m [["url_id", 12], ["users_group_id", 8]]
+ [1m[35m (96.3ms)[0m commit transaction
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 17:44:32 +0300
+Processing by LoginController#index as HTML
+ Rendered login/index.html.erb within layouts/application (4.4ms)
+Completed 200 OK in 262ms (Views: 261.9ms | ActiveRecord: 0.0ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 17:44:32 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 17:44:32 +0300
+Started GET "/oauth/yandex?code=1942891" for 127.0.0.1 at 2016-05-15 17:44:34 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"1942891", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "18fd9bd1-b947-42ff-ab6e-03751b7ff4e9"], ["id", 2]]
+ [1m[36m (138.5ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 342ms (Views: 0.5ms | ActiveRecord: 139.3ms)
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 17:44:34 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "18fd9bd1-b947-42ff-ab6e-03751b7ff4e9"]]
+ [1m[35mSQL (0.4ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 38ms (Views: 0.2ms | ActiveRecord: 1.3ms)
+Started GET "/login/logout" for 127.0.0.1 at 2016-05-15 17:44:34 +0300
+Processing by LoginController#logout as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "18fd9bd1-b947-42ff-ab6e-03751b7ff4e9"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", nil], ["id", 2]]
+ [1m[35m (115.4ms)[0m commit transaction
+Completed 200 OK in 121ms (Views: 0.4ms | ActiveRecord: 116.2ms)
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (106.6ms)[0m [1mCREATE TABLE "urls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "url_pattern" varchar, "name" varchar, "http_method" varchar) [0m
+ [1m[35m (98.2ms)[0m CREATE TABLE "user_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
+ [1m[36m (0.2ms)[0m [1mselect sqlite_version(*)[0m
+ [1m[35m (102.8ms)[0m CREATE INDEX "index_user_groups_on_name" ON "user_groups" ("name")
+ [1m[36m (98.7ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "api_code" varchar) [0m
+ [1m[35m (100.0ms)[0m CREATE INDEX "index_users_on_name" ON "users" ("name")
+ [1m[36m (106.9ms)[0m [1mCREATE TABLE "users_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_group_id" integer, "user_id" integer) [0m
+ [1m[35m (123.3ms)[0m CREATE TABLE "users_urls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "users_group_id" integer, "url_id" integer)
+ [1m[36m (96.2ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
+ [1m[35m (98.5ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
+ [1m[36m (0.2ms)[0m [1mSELECT version FROM "schema_migrations"[0m
+ [1m[35m (98.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160514163909')
+ [1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "guest"]]
+ [1m[35m (98.3ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"]]
+ [1m[36m (98.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.1ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?)[0m [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"]]
+ [1m[35m (98.7ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.1ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login/logout"], ["name", "Logout page"], ["http_method", "GET"]]
+ [1m[36m (116.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Guest"]]
+ [1m[35m (124.1ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (103.6ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("users_group_id") VALUES (?)[0m [["users_group_id", 1]]
+ [1m[35m (118.4ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_urls" ("users_group_id") VALUES (?) [["users_group_id", 1]]
+ [1m[36m (96.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("users_group_id") VALUES (?)[0m [["users_group_id", 1]]
+ [1m[35m (97.3ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("name") VALUES (?) [["name", "bar555@yandex.ru"]]
+ [1m[36m (103.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Test"]]
+ [1m[35m (104.1ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 2], ["user_group_id", 2]]
+ [1m[36m (96.5ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 1]]
+ [1m[35m (402.8ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (112.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id", "users_group_id") VALUES (?, ?)[0m [["url_id", 4], ["users_group_id", 2]]
+ [1m[35m (129.2ms)[0m commit transaction
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 17:46:12 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.3ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+Filter chain halted as :check_access rendered or redirected
+Completed 403 Forbidden in 24ms (Views: 0.2ms | ActiveRecord: 1.3ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "guest"]]
+ [1m[35m (112.4ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"]]
+ [1m[36m (107.6ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?)[0m [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"]]
+ [1m[35m (115.0ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login/logout"], ["name", "Logout page"], ["http_method", "GET"]]
+ [1m[36m (95.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Guest"]]
+ [1m[35m (97.1ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 3], ["user_group_id", 3]]
+ [1m[36m (101.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("users_group_id") VALUES (?)[0m [["users_group_id", 4]]
+ [1m[35m (95.7ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "users_urls" ("users_group_id") VALUES (?) [["users_group_id", 4]]
+ [1m[36m (122.2ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("users_group_id") VALUES (?)[0m [["users_group_id", 4]]
+ [1m[35m (104.9ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("name") VALUES (?) [["name", "bar555@yandex.ru"]]
+ [1m[36m (95.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Test"]]
+ [1m[35m (114.3ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 4], ["user_group_id", 4]]
+ [1m[36m (112.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 4], ["user_group_id", 3]]
+ [1m[35m (96.8ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (103.6ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id", "users_group_id") VALUES (?, ?)[0m [["url_id", 8], ["users_group_id", 5]]
+ [1m[35m (96.0ms)[0m commit transaction
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 17:46:56 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.3ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+Filter chain halted as :check_access rendered or redirected
+Completed 403 Forbidden in 31ms (Views: 0.3ms | ActiveRecord: 1.2ms)
+ [1m[36m (106.5ms)[0m [1mCREATE TABLE "urls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "url_pattern" varchar, "name" varchar, "http_method" varchar) [0m
+ [1m[35m (123.8ms)[0m CREATE TABLE "user_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
+ [1m[36m (0.2ms)[0m [1mselect sqlite_version(*)[0m
+ [1m[35m (106.2ms)[0m CREATE INDEX "index_user_groups_on_name" ON "user_groups" ("name")
+ [1m[36m (81.8ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "api_code" varchar) [0m
+ [1m[35m (74.9ms)[0m CREATE INDEX "index_users_on_name" ON "users" ("name")
+ [1m[36m (106.7ms)[0m [1mCREATE TABLE "users_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_group_id" integer, "user_id" integer) [0m
+ [1m[35m (115.0ms)[0m CREATE TABLE "users_urls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "users_group_id" integer, "url_id" integer)
+ [1m[36m (121.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
+ [1m[35m (98.8ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
+ [1m[36m (0.3ms)[0m [1mSELECT version FROM "schema_migrations"[0m
+ [1m[35m (98.5ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160514163909')
+ [1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "guest"]]
+ [1m[35m (89.4ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"]]
+ [1m[36m (73.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?)[0m [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"]]
+ [1m[35m (105.8ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login/logout"], ["name", "Logout page"], ["http_method", "GET"]]
+ [1m[36m (104.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Guest"]]
+ [1m[35m (97.1ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (100.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("users_group_id") VALUES (?)[0m [["users_group_id", 1]]
+ [1m[35m (120.6ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_urls" ("users_group_id") VALUES (?) [["users_group_id", 1]]
+ [1m[36m (104.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("users_group_id") VALUES (?)[0m [["users_group_id", 1]]
+ [1m[35m (88.1ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("name") VALUES (?) [["name", "bar555@yandex.ru"]]
+ [1m[36m (88.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Test"]]
+ [1m[35m (112.4ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 2], ["user_group_id", 2]]
+ [1m[36m (122.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 1]]
+ [1m[35m (96.2ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (120.5ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id", "users_group_id") VALUES (?, ?)[0m [["url_id", 4], ["users_group_id", 2]]
+ [1m[35m (137.1ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 17:48:50 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.3ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+Filter chain halted as :check_access rendered or redirected
+Completed 403 Forbidden in 20ms (Views: 0.3ms | ActiveRecord: 1.0ms)
+Started GET "/login" for 127.0.0.1 at 2016-05-15 17:48:58 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.6ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+Filter chain halted as :check_access rendered or redirected
+Completed 403 Forbidden in 6ms (Views: 0.9ms | ActiveRecord: 0.7ms)
+Started GET "/login" for 127.0.0.1 at 2016-05-15 17:48:58 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.3ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+Filter chain halted as :check_access rendered or redirected
+Completed 403 Forbidden in 5ms (Views: 0.9ms | ActiveRecord: 0.4ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "guest"]]
+ [1m[35m (104.3ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"]]
+ [1m[36m (97.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?)[0m [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"]]
+ [1m[35m (82.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login/logout"], ["name", "Logout page"], ["http_method", "GET"]]
+ [1m[36m (88.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Guest"]]
+ [1m[35m (81.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 3], ["user_group_id", 3]]
+ [1m[36m (83.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("users_group_id") VALUES (?)[0m [["users_group_id", 4]]
+ [1m[35m (102.5ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_urls" ("users_group_id") VALUES (?) [["users_group_id", 4]]
+ [1m[36m (115.2ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("users_group_id") VALUES (?)[0m [["users_group_id", 4]]
+ [1m[35m (102.1ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("name") VALUES (?) [["name", "bar555@yandex.ru"]]
+ [1m[36m (104.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Test"]]
+ [1m[35m (105.5ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 4], ["user_group_id", 4]]
+ [1m[36m (79.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 4], ["user_group_id", 3]]
+ [1m[35m (121.8ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (195.3ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users_urls" ("url_id", "users_group_id") VALUES (?, ?)[0m [["url_id", 8], ["users_group_id", 5]]
+ [1m[35m (120.6ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "guest"]]
+ [1m[35m (89.7ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"]]
+ [1m[36m (92.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?)[0m [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"]]
+ [1m[35m (96.8ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login/logout"], ["name", "Logout page"], ["http_method", "GET"]]
+ [1m[36m (87.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Guest"]]
+ [1m[35m (97.9ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 5], ["user_group_id", 5]]
+ [1m[36m (98.5ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("users_group_id") VALUES (?)[0m [["users_group_id", 7]]
+ [1m[35m (103.9ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "users_urls" ("users_group_id") VALUES (?) [["users_group_id", 7]]
+ [1m[36m (88.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("users_group_id") VALUES (?)[0m [["users_group_id", 7]]
+ [1m[35m (104.6ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("name") VALUES (?) [["name", "bar555@yandex.ru"]]
+ [1m[36m (95.5ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Test"]]
+ [1m[35m (105.6ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 6], ["user_group_id", 6]]
+ [1m[36m (95.5ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 6], ["user_group_id", 5]]
+ [1m[35m (96.1ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (103.5ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id", "users_group_id") VALUES (?, ?)[0m [["url_id", 12], ["users_group_id", 8]]
+ [1m[35m (103.9ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 17:50:01 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+Filter chain halted as :check_access rendered or redirected
+Completed 403 Forbidden in 23ms (Views: 0.3ms | ActiveRecord: 1.2ms)
+ [1m[36m (85.5ms)[0m [1mCREATE TABLE "urls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "url_pattern" varchar, "name" varchar, "http_method" varchar) [0m
+ [1m[35m (115.2ms)[0m CREATE TABLE "user_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
+ [1m[36m (0.2ms)[0m [1mselect sqlite_version(*)[0m
+ [1m[35m (117.2ms)[0m CREATE INDEX "index_user_groups_on_name" ON "user_groups" ("name")
+ [1m[36m (99.6ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "api_code" varchar) [0m
+ [1m[35m (98.3ms)[0m CREATE INDEX "index_users_on_name" ON "users" ("name")
+ [1m[36m (98.3ms)[0m [1mCREATE TABLE "users_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_group_id" integer, "user_id" integer) [0m
+ [1m[35m (98.2ms)[0m CREATE TABLE "users_urls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "users_group_id" integer, "url_id" integer)
+ [1m[36m (103.9ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
+ [1m[35m (98.6ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
+ [1m[36m (0.3ms)[0m [1mSELECT version FROM "schema_migrations"[0m
+ [1m[35m (98.5ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160514163909')
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "guest"]]
+ [1m[35m (90.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"]]
+ [1m[36m (85.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?)[0m [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"]]
+ [1m[35m (97.0ms)[0m commit transaction
+ [1m[36m (0.3ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login/logout"], ["name", "Logout page"], ["http_method", "GET"]]
+ [1m[36m (104.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Guest"]]
+ [1m[35m (99.1ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (103.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id", "users_group_id") VALUES (?, ?)[0m [["url_id", 1], ["users_group_id", 1]]
+ [1m[35m (102.1ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_urls" ("url_id", "users_group_id") VALUES (?, ?) [["url_id", 2], ["users_group_id", 1]]
+ [1m[36m (96.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id", "users_group_id") VALUES (?, ?)[0m [["url_id", 3], ["users_group_id", 1]]
+ [1m[35m (88.6ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("name") VALUES (?) [["name", "bar555@yandex.ru"]]
+ [1m[36m (112.5ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Test"]]
+ [1m[35m (95.8ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 2], ["user_group_id", 2]]
+ [1m[36m (105.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 1]]
+ [1m[35m (95.9ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (95.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id", "users_group_id") VALUES (?, ?)[0m [["url_id", 4], ["users_group_id", 2]]
+ [1m[35m (95.9ms)[0m commit transaction
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users"[0m
+Started GET "/login" for 127.0.0.1 at 2016-05-15 17:50:51 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.3ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (3.4ms)
+Completed 200 OK in 270ms (Views: 223.0ms | ActiveRecord: 1.3ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 17:50:51 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 17:50:51 +0300
+Started GET "/oauth/yandex?code=2309039" for 127.0.0.1 at 2016-05-15 17:50:53 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"2309039", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.7ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "14a77c0a-3c3a-437d-9994-ad253e5988a7"], ["id", 2]]
+ [1m[36m (107.0ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 324ms (Views: 0.5ms | ActiveRecord: 108.8ms)
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 17:50:53 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "14a77c0a-3c3a-437d-9994-ad253e5988a7"]]
+ [1m[35mSQL (0.5ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 0.9ms)
+Started GET "/login/logout" for 127.0.0.1 at 2016-05-15 17:50:54 +0300
+Processing by LoginController#logout as HTML
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "14a77c0a-3c3a-437d-9994-ad253e5988a7"]]
+ [1m[35mSQL (0.3ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Filter chain halted as :check_access rendered or redirected
+Completed 401 Unauthorized in 4ms (Views: 0.2ms | ActiveRecord: 0.5ms)
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 17:53:10 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.3ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (3.2ms)
+Completed 200 OK in 289ms (Views: 221.3ms | ActiveRecord: 2.0ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 17:53:10 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 17:53:10 +0300
+Started GET "/oauth/yandex?code=1078236" for 127.0.0.1 at 2016-05-15 17:53:11 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"1078236", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.6ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "0db4667b-cf16-4fec-96c7-8e76551cab20"], ["id", 2]]
+ [1m[36m (112.2ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 338ms (Views: 0.5ms | ActiveRecord: 114.3ms)
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 17:53:12 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "0db4667b-cf16-4fec-96c7-8e76551cab20"]]
+ [1m[35mSQL (0.3ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 7ms (Views: 0.5ms | ActiveRecord: 0.7ms)
+Started GET "/login/logout" for 127.0.0.1 at 2016-05-15 17:53:12 +0300
+Processing by LoginController#logout as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "0db4667b-cf16-4fec-96c7-8e76551cab20"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."users_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "users_groups"."id" AS t2_r0, "users_groups"."user_group_id" AS t2_r1, "users_groups"."user_id" AS t2_r2, "users"."id" AS t3_r0, "users"."name" AS t3_r1, "users"."api_code" AS t3_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "users_groups" ON "users_groups"."id" = "users_urls"."users_group_id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Filter chain halted as :check_access rendered or redirected
+Completed 401 Unauthorized in 8ms (Views: 0.4ms | ActiveRecord: 1.0ms)
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36m (107.6ms)[0m [1mCREATE TABLE "urls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "url_pattern" varchar, "name" varchar, "http_method" varchar) [0m
+ [1m[35m (100.3ms)[0m CREATE TABLE "user_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
+ [1m[36m (0.2ms)[0m [1mselect sqlite_version(*)[0m
+ [1m[35m (98.2ms)[0m CREATE INDEX "index_user_groups_on_name" ON "user_groups" ("name")
+ [1m[36m (98.2ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "api_code" varchar) [0m
+ [1m[35m (98.2ms)[0m CREATE INDEX "index_users_on_name" ON "users" ("name")
+ [1m[36m (123.0ms)[0m [1mCREATE TABLE "users_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_group_id" integer, "user_id" integer) [0m
+ [1m[35m (132.0ms)[0m CREATE TABLE "users_urls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_group_id" integer, "url_id" integer)
+ [1m[36m (113.3ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
+ [1m[35m (98.5ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
+ [1m[36m (0.3ms)[0m [1mSELECT version FROM "schema_migrations"[0m
+ [1m[35m (108.0ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160514163909')
+ [1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:36:40 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+Completed 500 Internal Server Error in 19ms (ActiveRecord: 0.7ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "guest"]]
+ [1m[35m (105.4ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"]]
+ [1m[36m (97.6ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?)[0m [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"]]
+ [1m[35m (97.7ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login/logout"], ["name", "Logout page"], ["http_method", "GET"]]
+ [1m[36m (97.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Guest"]]
+ [1m[35m (106.4ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (98.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id", "user_group_id") VALUES (?, ?)[0m [["url_id", 1], ["user_group_id", 1]]
+ [1m[35m (127.5ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "users_urls" ("url_id", "user_group_id") VALUES (?, ?) [["url_id", 2], ["user_group_id", 1]]
+ [1m[36m (113.5ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id", "user_group_id") VALUES (?, ?)[0m [["url_id", 3], ["user_group_id", 1]]
+ [1m[35m (104.5ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("name") VALUES (?) [["name", "bar555@yandex.ru"]]
+ [1m[36m (96.5ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Test"]]
+ [1m[35m (104.0ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 2], ["user_group_id", 2]]
+ [1m[36m (95.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 1]]
+ [1m[35m (96.2ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (121.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "users_urls" ("url_id", "user_group_id") VALUES (?, ?)[0m [["url_id", 4], ["user_group_id", 2]]
+ [1m[35m (104.9ms)[0m commit transaction
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:36:55 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.5ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (3.7ms)
+Completed 200 OK in 260ms (Views: 222.9ms | ActiveRecord: 1.3ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 18:36:55 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 18:36:55 +0300
+Started GET "/oauth/yandex?code=5092590" for 127.0.0.1 at 2016-05-15 18:36:57 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"5092590", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.5ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "0f0aa28c-db4b-4f38-9c65-f3ae77fe2bfe"], ["id", 2]]
+ [1m[36m (108.2ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 326ms (Views: 0.5ms | ActiveRecord: 109.6ms)
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:36:57 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "0f0aa28c-db4b-4f38-9c65-f3ae77fe2bfe"]]
+ [1m[35mSQL (0.5ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 0.9ms)
+Started GET "/login/logout" for 127.0.0.1 at 2016-05-15 18:36:57 +0300
+Processing by LoginController#logout as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "0f0aa28c-db4b-4f38-9c65-f3ae77fe2bfe"]]
+ [1m[35mSQL (0.9ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "0f0aa28c-db4b-4f38-9c65-f3ae77fe2bfe"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", nil], ["id", 2]]
+ [1m[35m (115.0ms)[0m commit transaction
+Completed 200 OK in 129ms (Views: 0.3ms | ActiveRecord: 116.7ms)
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:36:57 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "0f0aa28c-db4b-4f38-9c65-f3ae77fe2bfe"]]
+Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.1ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:38:01 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (2.9ms)
+Completed 200 OK in 296ms (Views: 224.2ms | ActiveRecord: 2.2ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 18:38:01 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 18:38:01 +0300
+Started GET "/oauth/yandex?code=7841161" for 127.0.0.1 at 2016-05-15 18:38:02 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"7841161", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "120ceb7b-d82a-4402-9b51-e77d0418df71"], ["id", 2]]
+ [1m[36m (99.3ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 313ms (Views: 0.5ms | ActiveRecord: 101.0ms)
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:38:03 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "120ceb7b-d82a-4402-9b51-e77d0418df71"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 11ms (Views: 0.3ms | ActiveRecord: 1.2ms)
+Started GET "/login/logout" for 127.0.0.1 at 2016-05-15 18:38:03 +0300
+Processing by LoginController#logout as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "120ceb7b-d82a-4402-9b51-e77d0418df71"]]
+ [1m[35mSQL (0.7ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "120ceb7b-d82a-4402-9b51-e77d0418df71"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", nil], ["id", 2]]
+ [1m[35m (123.8ms)[0m commit transaction
+Completed 200 OK in 137ms (Views: 0.3ms | ActiveRecord: 125.3ms)
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:38:03 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "120ceb7b-d82a-4402-9b51-e77d0418df71"]]
+Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.2ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:39:21 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.3ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (2.8ms)
+Completed 200 OK in 293ms (Views: 224.0ms | ActiveRecord: 2.1ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 18:39:21 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 18:39:21 +0300
+Started GET "/oauth/yandex?code=2525015" for 127.0.0.1 at 2016-05-15 18:39:22 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"2525015", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.9ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "fc1e87b2-3f03-462f-9424-7ff6271b1d94"], ["id", 2]]
+ [1m[36m (98.0ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 333ms (Views: 0.6ms | ActiveRecord: 100.3ms)
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:39:23 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "fc1e87b2-3f03-462f-9424-7ff6271b1d94"]]
+ [1m[35mSQL (0.5ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 6ms (Views: 0.2ms | ActiveRecord: 0.7ms)
+Started GET "/login/logout" for 127.0.0.1 at 2016-05-15 18:39:23 +0300
+Processing by LoginController#logout as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "fc1e87b2-3f03-462f-9424-7ff6271b1d94"]]
+ [1m[35mSQL (0.9ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ [1m[36mCACHE (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "fc1e87b2-3f03-462f-9424-7ff6271b1d94"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", nil], ["id", 2]]
+ [1m[35m (134.7ms)[0m commit transaction
+Completed 200 OK in 149ms (Views: 0.4ms | ActiveRecord: 136.5ms)
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:39:23 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "fc1e87b2-3f03-462f-9424-7ff6271b1d94"]]
+Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.2ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:39:55 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (2.4ms)
+Completed 200 OK in 284ms (Views: 206.9ms | ActiveRecord: 2.3ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 18:39:55 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 18:39:55 +0300
+Started GET "/oauth/yandex?code=9404540" for 127.0.0.1 at 2016-05-15 18:39:56 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"9404540", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (1.0ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "7806b053-7042-414a-a357-d8da193ab053"], ["id", 2]]
+ [1m[36m (102.8ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 306ms (Views: 0.6ms | ActiveRecord: 104.9ms)
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:39:57 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "7806b053-7042-414a-a357-d8da193ab053"]]
+ [1m[35mSQL (0.6ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 10ms (Views: 0.3ms | ActiveRecord: 1.1ms)
+Started GET "/login/logout" for 127.0.0.1 at 2016-05-15 18:39:57 +0300
+Processing by LoginController#logout as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "7806b053-7042-414a-a357-d8da193ab053"]]
+ [1m[35mSQL (0.9ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "7806b053-7042-414a-a357-d8da193ab053"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", nil], ["id", 2]]
+ [1m[35m (142.0ms)[0m commit transaction
+Completed 200 OK in 156ms (Views: 0.5ms | ActiveRecord: 143.7ms)
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:39:57 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "7806b053-7042-414a-a357-d8da193ab053"]]
+Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.2ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:42:55 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+Completed 500 Internal Server Error in 20ms (ActiveRecord: 0.8ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:43:53 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+Completed 500 Internal Server Error in 22ms (ActiveRecord: 0.9ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:44:09 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (3.0ms)
+Completed 200 OK in 305ms (Views: 230.3ms | ActiveRecord: 2.3ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 18:44:09 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 18:44:09 +0300
+Started GET "/oauth/yandex?code=9004325" for 127.0.0.1 at 2016-05-15 18:44:10 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"9004325", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.5ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "89c463b5-6f8d-4259-9a25-35ff63a442d5"], ["id", 2]]
+ [1m[36m (111.9ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 344ms (Views: 0.5ms | ActiveRecord: 113.3ms)
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:44:11 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "89c463b5-6f8d-4259-9a25-35ff63a442d5"]]
+ [1m[35mSQL (0.5ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 8ms (Views: 0.2ms | ActiveRecord: 1.0ms)
+Started GET "/login/logout" for 127.0.0.1 at 2016-05-15 18:44:11 +0300
+Processing by LoginController#logout as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "89c463b5-6f8d-4259-9a25-35ff63a442d5"]]
+ [1m[35mSQL (0.9ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "89c463b5-6f8d-4259-9a25-35ff63a442d5"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", nil], ["id", 2]]
+ [1m[35m (147.2ms)[0m commit transaction
+Completed 200 OK in 160ms (Views: 0.5ms | ActiveRecord: 148.8ms)
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:44:11 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.6ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+Filter chain halted as :check_access rendered or redirected
+Completed 403 Forbidden in 6ms (Views: 0.2ms | ActiveRecord: 0.7ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:44:43 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (3.1ms)
+Completed 200 OK in 307ms (Views: 229.7ms | ActiveRecord: 2.4ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 18:44:43 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 18:44:43 +0300
+Started GET "/oauth/yandex?code=7959510" for 127.0.0.1 at 2016-05-15 18:44:44 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"7959510", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.7ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "e379a113-25cb-4240-ae7a-c935ee0849c8"], ["id", 2]]
+ [1m[36m (108.2ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 324ms (Views: 0.4ms | ActiveRecord: 109.8ms)
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:44:45 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "e379a113-25cb-4240-ae7a-c935ee0849c8"]]
+ [1m[35mSQL (0.6ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 0.9ms)
+Started GET "/login/logout" for 127.0.0.1 at 2016-05-15 18:44:45 +0300
+Processing by LoginController#logout as HTML
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "e379a113-25cb-4240-ae7a-c935ee0849c8"]]
+ [1m[35mSQL (0.5ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "e379a113-25cb-4240-ae7a-c935ee0849c8"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", nil], ["id", 2]]
+ [1m[35m (121.5ms)[0m commit transaction
+Completed 200 OK in 130ms (Views: 0.4ms | ActiveRecord: 122.4ms)
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:44:45 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "e379a113-25cb-4240-ae7a-c935ee0849c8"]]
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.6ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+Filter chain halted as :check_access rendered or redirected
+Completed 401 Unauthorized in 7ms (Views: 0.3ms | ActiveRecord: 0.8ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:46:15 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.3ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (2.7ms)
+Completed 200 OK in 286ms (Views: 212.8ms | ActiveRecord: 2.0ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 18:46:15 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 18:46:15 +0300
+Started GET "/oauth/yandex?code=9430346" for 127.0.0.1 at 2016-05-15 18:46:16 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"9430346", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.3ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "bd3a6c24-dd59-45a9-9c96-d6b2a93ea805"], ["id", 2]]
+ [1m[36m (106.7ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 292ms (Views: 0.5ms | ActiveRecord: 108.4ms)
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:46:17 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "bd3a6c24-dd59-45a9-9c96-d6b2a93ea805"]]
+ [1m[35mSQL (0.6ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 1.0ms)
+Started GET "/login/logout" for 127.0.0.1 at 2016-05-15 18:46:17 +0300
+Processing by LoginController#logout as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "bd3a6c24-dd59-45a9-9c96-d6b2a93ea805"]]
+ [1m[35mSQL (0.9ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "bd3a6c24-dd59-45a9-9c96-d6b2a93ea805"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", nil], ["id", 2]]
+ [1m[35m (118.6ms)[0m commit transaction
+Completed 200 OK in 133ms (Views: 0.4ms | ActiveRecord: 120.2ms)
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:46:17 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "bd3a6c24-dd59-45a9-9c96-d6b2a93ea805"]]
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.9ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+Completed 500 Internal Server Error in 12ms (ActiveRecord: 1.1ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:47:15 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+Completed 500 Internal Server Error in 25ms (ActiveRecord: 1.0ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:47:29 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (3.0ms)
+Completed 200 OK in 311ms (Views: 232.5ms | ActiveRecord: 2.4ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 18:47:30 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 18:47:30 +0300
+Started GET "/oauth/yandex?code=2257307" for 127.0.0.1 at 2016-05-15 18:47:31 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"2257307", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.5ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.3ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "4d06f56b-c860-4460-a647-119a20a60310"], ["id", 2]]
+ [1m[36m (101.6ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 442ms (Views: 0.3ms | ActiveRecord: 103.5ms)
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:47:31 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "4d06f56b-c860-4460-a647-119a20a60310"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 10ms (Views: 0.3ms | ActiveRecord: 1.3ms)
+Started GET "/login/logout" for 127.0.0.1 at 2016-05-15 18:47:31 +0300
+Processing by LoginController#logout as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "4d06f56b-c860-4460-a647-119a20a60310"]]
+ [1m[35mSQL (0.9ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "4d06f56b-c860-4460-a647-119a20a60310"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", nil], ["id", 2]]
+ [1m[35m (134.2ms)[0m commit transaction
+Completed 200 OK in 148ms (Views: 0.4ms | ActiveRecord: 135.9ms)
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:47:31 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "4d06f56b-c860-4460-a647-119a20a60310"]]
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.6ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+Filter chain halted as :check_access rendered or redirected
+Completed 403 Forbidden in 7ms (Views: 0.3ms | ActiveRecord: 0.9ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:48:37 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.3ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (2.6ms)
+Completed 200 OK in 274ms (Views: 213.6ms | ActiveRecord: 1.8ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 18:48:37 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 18:48:37 +0300
+Started GET "/oauth/yandex?code=3181323" for 127.0.0.1 at 2016-05-15 18:48:38 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"3181323", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "2bbe9241-7c59-4bba-bfe7-2311f84575a4"], ["id", 2]]
+ [1m[36m (136.4ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 508ms (Views: 0.6ms | ActiveRecord: 137.8ms)
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:48:39 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "2bbe9241-7c59-4bba-bfe7-2311f84575a4"]]
+ [1m[35mSQL (0.4ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 6ms (Views: 0.2ms | ActiveRecord: 0.7ms)
+Started GET "/login/logout" for 127.0.0.1 at 2016-05-15 18:48:39 +0300
+Processing by LoginController#logout as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "2bbe9241-7c59-4bba-bfe7-2311f84575a4"]]
+ [1m[35mSQL (0.5ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "2bbe9241-7c59-4bba-bfe7-2311f84575a4"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", nil], ["id", 2]]
+ [1m[35m (90.3ms)[0m commit transaction
+Completed 200 OK in 99ms (Views: 0.4ms | ActiveRecord: 91.2ms)
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:48:39 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "2bbe9241-7c59-4bba-bfe7-2311f84575a4"]]
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.3ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+Filter chain halted as :check_access rendered or redirected
+Completed 403 Forbidden in 7ms (Views: 0.4ms | ActiveRecord: 0.6ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+-------------------------------------
+OauthServiceProviderTest: test_logout
+-------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:54:39 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (3.0ms)
+Completed 200 OK in 304ms (Views: 228.1ms | ActiveRecord: 2.3ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 18:54:39 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 18:54:39 +0300
+Started GET "/oauth/yandex?code=9296413" for 127.0.0.1 at 2016-05-15 18:54:41 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"9296413", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.9ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.7ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "dbb91fdc-4f29-4431-8211-c390c6ccd953"], ["id", 2]]
+ [1m[36m (214.9ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 519ms (Views: 0.5ms | ActiveRecord: 217.1ms)
+ [1m[35mUser Load (0.7ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/login/logout" for 127.0.0.1 at 2016-05-15 18:54:41 +0300
+Processing by LoginController#logout as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+Completed 400 Bad Request in 10ms (Views: 0.4ms | ActiveRecord: 1.1ms)
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:54:41 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.6ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (0.4ms)
+Completed 200 OK in 9ms (Views: 2.7ms | ActiveRecord: 1.2ms)
+Started GET "/oauth/yandex?code=6240117" for 127.0.0.1 at 2016-05-15 18:54:42 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"6240117", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.8ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "91b4dcc7-bcfa-4800-83cb-9f4c7a855b7c"], ["id", 2]]
+ [1m[36m (95.8ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 301ms (Views: 0.4ms | ActiveRecord: 97.8ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+-------------------------------------
+OauthServiceProviderTest: test_logout
+-------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:55:20 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (2.9ms)
+Completed 200 OK in 296ms (Views: 220.9ms | ActiveRecord: 2.3ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 18:55:21 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 18:55:21 +0300
+Started GET "/oauth/yandex?code=8860613" for 127.0.0.1 at 2016-05-15 18:55:22 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"8860613", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.2ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "0f820c62-b2af-4ddc-aab6-951406825f8b"], ["id", 2]]
+ [1m[36m (117.5ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 282ms (Views: 0.3ms | ActiveRecord: 118.5ms)
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/login/logout" for 127.0.0.1 at 2016-05-15 18:55:22 +0300
+Processing by LoginController#logout as HTML
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "0f820c62-b2af-4ddc-aab6-951406825f8b"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "0f820c62-b2af-4ddc-aab6-951406825f8b"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", nil], ["id", 2]]
+ [1m[35m (105.6ms)[0m commit transaction
+Completed 200 OK in 120ms (Views: 0.4ms | ActiveRecord: 107.5ms)
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:55:22 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "0f820c62-b2af-4ddc-aab6-951406825f8b"]]
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.5ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+Filter chain halted as :check_access rendered or redirected
+Completed 403 Forbidden in 6ms (Views: 0.2ms | ActiveRecord: 0.8ms)
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:55:23 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "0f820c62-b2af-4ddc-aab6-951406825f8b"]]
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.8ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (0.5ms)
+Completed 200 OK in 15ms (Views: 3.9ms | ActiveRecord: 2.1ms)
+Started GET "/oauth/yandex?code=9131796" for 127.0.0.1 at 2016-05-15 18:55:23 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"9131796", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "0f820c62-b2af-4ddc-aab6-951406825f8b"]]
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "18df6522-b224-470f-873e-2e69c52df8d8"], ["id", 2]]
+ [1m[35m (118.0ms)[0m commit transaction
+Completed 200 OK in 329ms (Views: 0.5ms | ActiveRecord: 120.1ms)
+ [1m[36m (104.5ms)[0m [1mCREATE TABLE "urls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "url_pattern" varchar, "name" varchar, "http_method" varchar) [0m
+ [1m[35m (98.2ms)[0m CREATE TABLE "user_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
+ [1m[36m (0.2ms)[0m [1mselect sqlite_version(*)[0m
+ [1m[35m (107.7ms)[0m CREATE INDEX "index_user_groups_on_name" ON "user_groups" ("name")
+ [1m[36m (98.2ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "api_code" varchar) [0m
+ [1m[35m (98.3ms)[0m CREATE INDEX "index_users_on_name" ON "users" ("name")
+ [1m[36m (98.2ms)[0m [1mCREATE TABLE "users_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_group_id" integer, "user_id" integer) [0m
+ [1m[35m (99.1ms)[0m CREATE TABLE "users_urls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_group_id" integer, "url_id" integer)
+ [1m[36m (96.0ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
+ [1m[35m (98.3ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
+ [1m[36m (0.3ms)[0m [1mSELECT version FROM "schema_migrations"[0m
+ [1m[35m (98.8ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160514163909')
+ [1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:56:55 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+Completed 500 Internal Server Error in 18ms (ActiveRecord: 0.7ms)
+-------------------------------------
+OauthServiceProviderTest: test_logout
+-------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:56:56 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.5ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+-------------------------------------
+OauthServiceProviderTest: test_logout
+-------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:57:13 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+Completed 500 Internal Server Error in 19ms (ActiveRecord: 0.7ms)
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:57:13 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.5ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "guest"]]
+ [1m[35m (111.9ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"]]
+ [1m[36m (103.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?)[0m [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"]]
+ [1m[35m (96.3ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login/logout"], ["name", "Logout page"], ["http_method", "GET"]]
+ [1m[36m (96.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Guest"]]
+ [1m[35m (103.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (99.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id", "user_group_id") VALUES (?, ?)[0m [["url_id", 1], ["user_group_id", 1]]
+ [1m[35m (96.3ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_urls" ("url_id", "user_group_id") VALUES (?, ?) [["url_id", 2], ["user_group_id", 1]]
+ [1m[36m (96.2ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id", "user_group_id") VALUES (?, ?)[0m [["url_id", 3], ["user_group_id", 1]]
+ [1m[35m (97.6ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("name") VALUES (?) [["name", "bar555@yandex.ru"]]
+ [1m[36m (95.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Test"]]
+ [1m[35m (96.2ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 2], ["user_group_id", 2]]
+ [1m[36m (104.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 1]]
+ [1m[35m (96.2ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (103.6ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id", "user_group_id") VALUES (?, ?)[0m [["url_id", 4], ["user_group_id", 2]]
+ [1m[35m (104.0ms)[0m commit transaction
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:57:28 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (2.3ms)
+Completed 200 OK in 255ms (Views: 235.0ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 18:57:28 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 18:57:28 +0300
+Started GET "/oauth/yandex?code=1056535" for 127.0.0.1 at 2016-05-15 18:57:29 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"1056535", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "77972a89-ddbc-4a43-a129-c32fa726cf2f"], ["id", 2]]
+ [1m[35m (100.7ms)[0m commit transaction
+Completed 200 OK in 325ms (Views: 0.5ms | ActiveRecord: 102.6ms)
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:57:29 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "77972a89-ddbc-4a43-a129-c32fa726cf2f"]]
+ [1m[36mSQL (0.7ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2[0m
+Completed 200 OK in 11ms (Views: 0.3ms | ActiveRecord: 1.1ms)
+-------------------------------------
+OauthServiceProviderTest: test_logout
+-------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:57:30 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "77972a89-ddbc-4a43-a129-c32fa726cf2f"]]
+ [1m[36mSQL (0.9ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2[0m
+ Rendered login/index.html.erb within layouts/application (0.7ms)
+Completed 200 OK in 15ms (Views: 4.4ms | ActiveRecord: 1.3ms)
+Started GET "/oauth/yandex?code=9658663" for 127.0.0.1 at 2016-05-15 18:57:30 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"9658663", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "77972a89-ddbc-4a43-a129-c32fa726cf2f"]]
+ [1m[36mSQL (0.7ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "1343d271-5b99-4769-b757-250f0d632f78"], ["id", 2]]
+ [1m[36m (94.3ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 383ms (Views: 0.5ms | ActiveRecord: 96.1ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+-------------------------------------
+OauthServiceProviderTest: test_logout
+-------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:58:14 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (3.0ms)
+Completed 200 OK in 310ms (Views: 232.2ms | ActiveRecord: 2.4ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 18:58:15 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 18:58:15 +0300
+Started GET "/oauth/yandex?code=9008878" for 127.0.0.1 at 2016-05-15 18:58:16 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"9008878", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.7ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.7ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "1b8f99ca-4725-492d-8a1f-6effcfda43b2"], ["id", 2]]
+ [1m[36m (178.1ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 605ms (Views: 0.5ms | ActiveRecord: 180.2ms)
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/login/logout" for 127.0.0.1 at 2016-05-15 18:58:17 +0300
+Processing by LoginController#logout as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "1b8f99ca-4725-492d-8a1f-6effcfda43b2"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "1b8f99ca-4725-492d-8a1f-6effcfda43b2"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", nil], ["id", 2]]
+ [1m[35m (107.7ms)[0m commit transaction
+Completed 200 OK in 121ms (Views: 0.3ms | ActiveRecord: 109.2ms)
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:58:17 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "1b8f99ca-4725-492d-8a1f-6effcfda43b2"]]
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+Filter chain halted as :check_access rendered or redirected
+Completed 403 Forbidden in 10ms (Views: 0.4ms | ActiveRecord: 1.1ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:58:17 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "1b8f99ca-4725-492d-8a1f-6effcfda43b2"]]
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.6ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (0.5ms)
+Completed 200 OK in 10ms (Views: 3.2ms | ActiveRecord: 1.0ms)
+Started GET "/oauth/yandex?code=3548045" for 127.0.0.1 at 2016-05-15 18:58:17 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"3548045", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "1b8f99ca-4725-492d-8a1f-6effcfda43b2"]]
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "968dcbf4-c4fb-4ea2-899a-90a869511a3b"], ["id", 2]]
+ [1m[35m (103.2ms)[0m commit transaction
+Completed 200 OK in 325ms (Views: 0.4ms | ActiveRecord: 104.9ms)
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:58:32 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.7ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (0.5ms)
+Completed 200 OK in 10ms (Views: 3.2ms | ActiveRecord: 0.9ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 18:58:32 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 18:58:32 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 18:58:32 +0300
+Started GET "/login/logout" for 127.0.0.1 at 2016-05-15 18:58:37 +0300
+Processing by LoginController#logout as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.7ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+Completed 400 Bad Request in 8ms (Views: 0.3ms | ActiveRecord: 0.9ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:58:55 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (2.9ms)
+Completed 200 OK in 302ms (Views: 227.8ms | ActiveRecord: 2.2ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 18:58:55 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 18:58:55 +0300
+Started GET "/oauth/yandex?code=2648093" for 127.0.0.1 at 2016-05-15 18:58:56 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"2648093", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "6f9baff5-0ab9-4d06-b3eb-87472687cfa4"], ["id", 2]]
+ [1m[36m (100.1ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 309ms (Views: 0.5ms | ActiveRecord: 101.5ms)
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:58:57 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "6f9baff5-0ab9-4d06-b3eb-87472687cfa4"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 11ms (Views: 0.3ms | ActiveRecord: 1.2ms)
+-------------------------------------
+OauthServiceProviderTest: test_logout
+-------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:58:57 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "6f9baff5-0ab9-4d06-b3eb-87472687cfa4"]]
+ [1m[35mSQL (0.7ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ Rendered login/index.html.erb within layouts/application (0.5ms)
+Completed 200 OK in 11ms (Views: 2.5ms | ActiveRecord: 1.5ms)
+Started GET "/oauth/yandex?code=3594297" for 127.0.0.1 at 2016-05-15 18:58:57 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"3594297", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "6f9baff5-0ab9-4d06-b3eb-87472687cfa4"]]
+ [1m[35mSQL (0.4ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "ae3b0087-610d-4382-9ff5-5922ff6345cf"], ["id", 2]]
+ [1m[35m (103.2ms)[0m commit transaction
+Completed 200 OK in 374ms (Views: 0.3ms | ActiveRecord: 104.6ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:59:57 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (3.0ms)
+Completed 200 OK in 310ms (Views: 232.1ms | ActiveRecord: 2.4ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 18:59:57 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 18:59:57 +0300
+Started GET "/oauth/yandex?code=1084178" for 127.0.0.1 at 2016-05-15 18:59:59 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"1084178", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.5ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "279b4997-b9ae-48a0-a8ba-9bb06a9acda2"], ["id", 2]]
+ [1m[36m (97.2ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 275ms (Views: 0.3ms | ActiveRecord: 98.6ms)
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 18:59:59 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "279b4997-b9ae-48a0-a8ba-9bb06a9acda2"]]
+ [1m[35mSQL (0.6ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 1.0ms)
+-------------------------------------
+OauthServiceProviderTest: test_logout
+-------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 18:59:59 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "279b4997-b9ae-48a0-a8ba-9bb06a9acda2"]]
+ [1m[35mSQL (0.9ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ Rendered login/index.html.erb within layouts/application (0.5ms)
+Completed 200 OK in 15ms (Views: 3.9ms | ActiveRecord: 2.0ms)
+Started GET "/oauth/yandex?code=5198335" for 127.0.0.1 at 2016-05-15 18:59:59 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"5198335", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "279b4997-b9ae-48a0-a8ba-9bb06a9acda2"]]
+ [1m[35mSQL (0.9ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "b027150c-09fc-40c8-9bae-01eac6bcecf6"], ["id", 2]]
+ [1m[35m (95.7ms)[0m commit transaction
+Completed 200 OK in 312ms (Views: 0.5ms | ActiveRecord: 97.6ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:00:39 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.2ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (1.9ms)
+Completed 200 OK in 244ms (Views: 200.6ms | ActiveRecord: 1.3ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 19:00:39 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 19:00:39 +0300
+Started GET "/oauth/yandex?code=3558188" for 127.0.0.1 at 2016-05-15 19:00:40 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"3558188", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.3ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.7ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "021c97d4-00d9-4cf7-a9f8-6110e443575c"], ["id", 2]]
+ [1m[36m (104.1ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 523ms (Views: 0.5ms | ActiveRecord: 105.8ms)
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 19:00:41 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "021c97d4-00d9-4cf7-a9f8-6110e443575c"]]
+ [1m[35mSQL (0.7ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 1.1ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+-------------------------------------
+OauthServiceProviderTest: test_logout
+-------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:00:41 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "021c97d4-00d9-4cf7-a9f8-6110e443575c"]]
+ [1m[35mSQL (0.7ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ Rendered login/index.html.erb within layouts/application (0.5ms)
+Completed 200 OK in 11ms (Views: 3.1ms | ActiveRecord: 0.9ms)
+Started GET "/oauth/yandex?code=4138234" for 127.0.0.1 at 2016-05-15 19:00:41 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"4138234", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "021c97d4-00d9-4cf7-a9f8-6110e443575c"]]
+ [1m[35mSQL (0.9ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "fb901939-52a8-44b3-9997-428b502a3f7e"], ["id", 2]]
+ [1m[35m (118.2ms)[0m commit transaction
+Completed 200 OK in 304ms (Views: 0.5ms | ActiveRecord: 120.1ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:01:30 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.3ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (2.6ms)
+Completed 200 OK in 277ms (Views: 216.2ms | ActiveRecord: 1.8ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 19:01:30 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 19:01:30 +0300
+Started GET "/oauth/yandex?code=2141067" for 127.0.0.1 at 2016-05-15 19:01:31 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"2141067", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.5ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "351248fe-ca6f-4d6c-8eb9-7de9907046c0"], ["id", 2]]
+ [1m[36m (103.7ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 282ms (Views: 0.5ms | ActiveRecord: 105.1ms)
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 19:01:32 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "351248fe-ca6f-4d6c-8eb9-7de9907046c0"]]
+ [1m[35mSQL (0.7ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 8ms (Views: 0.2ms | ActiveRecord: 1.0ms)
+-------------------------------------
+OauthServiceProviderTest: test_logout
+-------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:01:32 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "351248fe-ca6f-4d6c-8eb9-7de9907046c0"]]
+ [1m[35mSQL (0.6ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ Rendered login/index.html.erb within layouts/application (0.4ms)
+Completed 200 OK in 10ms (Views: 2.7ms | ActiveRecord: 1.3ms)
+Started GET "/oauth/yandex?code=9845012" for 127.0.0.1 at 2016-05-15 19:01:32 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"9845012", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "351248fe-ca6f-4d6c-8eb9-7de9907046c0"]]
+ [1m[35mSQL (0.9ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "71323b3f-8afc-4b7e-a7b5-4c4f2146e6e0"], ["id", 2]]
+ [1m[35m (95.3ms)[0m commit transaction
+Completed 200 OK in 272ms (Views: 0.5ms | ActiveRecord: 97.3ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:02:28 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (3.1ms)
+Completed 200 OK in 298ms (Views: 223.0ms | ActiveRecord: 2.3ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 19:02:28 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 19:02:28 +0300
+Started GET "/oauth/yandex?code=4895791" for 127.0.0.1 at 2016-05-15 19:02:46 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"4895791", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.8ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "e69687e6-e9bc-4548-b152-f4c40e33913d"], ["id", 2]]
+ [1m[36m (103.2ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 301ms (Views: 0.6ms | ActiveRecord: 105.5ms)
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 19:02:46 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "e69687e6-e9bc-4548-b152-f4c40e33913d"]]
+ [1m[35mSQL (0.6ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 10ms (Views: 0.3ms | ActiveRecord: 1.0ms)
+-------------------------------------
+OauthServiceProviderTest: test_logout
+-------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:02:47 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "e69687e6-e9bc-4548-b152-f4c40e33913d"]]
+ [1m[35mSQL (0.9ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ Rendered login/index.html.erb within layouts/application (0.5ms)
+Completed 200 OK in 15ms (Views: 3.6ms | ActiveRecord: 1.9ms)
+Started GET "/oauth/yandex?code=2581071" for 127.0.0.1 at 2016-05-15 19:02:47 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"2581071", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "e69687e6-e9bc-4548-b152-f4c40e33913d"]]
+ [1m[35mSQL (0.9ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "e470eceb-d8d4-4e67-ba44-8703cee6cc3b"], ["id", 2]]
+ [1m[35m (105.2ms)[0m commit transaction
+Completed 200 OK in 314ms (Views: 0.5ms | ActiveRecord: 107.2ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:03:07 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (3.1ms)
+Completed 200 OK in 303ms (Views: 224.9ms | ActiveRecord: 2.3ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 19:03:07 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 19:03:08 +0300
+Started GET "/oauth/yandex?code=1717319" for 127.0.0.1 at 2016-05-15 19:03:09 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"1717319", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.9ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "49a27027-03b8-4025-a1b5-4df318286cad"], ["id", 2]]
+ [1m[36m (106.0ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 301ms (Views: 0.6ms | ActiveRecord: 108.0ms)
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 19:03:09 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "49a27027-03b8-4025-a1b5-4df318286cad"]]
+ [1m[35mSQL (0.5ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 7ms (Views: 0.2ms | ActiveRecord: 0.8ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+-------------------------------------
+OauthServiceProviderTest: test_logout
+-------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:03:09 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "49a27027-03b8-4025-a1b5-4df318286cad"]]
+ [1m[35mSQL (0.6ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ Rendered login/index.html.erb within layouts/application (0.4ms)
+Completed 200 OK in 9ms (Views: 3.0ms | ActiveRecord: 0.7ms)
+Started GET "/oauth/yandex?code=4979928" for 127.0.0.1 at 2016-05-15 19:03:09 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"4979928", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "49a27027-03b8-4025-a1b5-4df318286cad"]]
+ [1m[35mSQL (0.7ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "64177020-d703-49d1-a4ef-80bc88f0e363"], ["id", 2]]
+ [1m[35m (104.5ms)[0m commit transaction
+Completed 200 OK in 350ms (Views: 0.5ms | ActiveRecord: 106.2ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:03:43 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (3.0ms)
+Completed 200 OK in 310ms (Views: 233.1ms | ActiveRecord: 2.3ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 19:03:43 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 19:03:43 +0300
+Started GET "/oauth/yandex?code=9005396" for 127.0.0.1 at 2016-05-15 19:03:45 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"9005396", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.2ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "d621789e-edaf-4afd-8553-4e31f1b3175b"], ["id", 2]]
+ [1m[36m (101.3ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 547ms (Views: 0.5ms | ActiveRecord: 102.6ms)
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 19:03:45 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "d621789e-edaf-4afd-8553-4e31f1b3175b"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 11ms (Views: 0.4ms | ActiveRecord: 1.2ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+-------------------------------------
+OauthServiceProviderTest: test_logout
+-------------------------------------
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:03:56 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (3.1ms)
+Completed 200 OK in 304ms (Views: 225.8ms | ActiveRecord: 2.3ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 19:03:56 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 19:03:56 +0300
+Started GET "/oauth/yandex?code=6576011" for 127.0.0.1 at 2016-05-15 19:03:58 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"6576011", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.8ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "79702186-2e66-4b9f-a304-8898ba1e01a4"], ["id", 2]]
+ [1m[36m (91.3ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 290ms (Views: 0.4ms | ActiveRecord: 93.3ms)
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 19:03:58 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "79702186-2e66-4b9f-a304-8898ba1e01a4"]]
+ [1m[35mSQL (0.7ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 10ms (Views: 0.3ms | ActiveRecord: 1.1ms)
+-------------------------------------
+OauthServiceProviderTest: test_logout
+-------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:03:58 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "79702186-2e66-4b9f-a304-8898ba1e01a4"]]
+ [1m[35mSQL (0.5ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ Rendered login/index.html.erb within layouts/application (0.6ms)
+Completed 200 OK in 12ms (Views: 3.5ms | ActiveRecord: 1.3ms)
+Started GET "/oauth/yandex?code=2584937" for 127.0.0.1 at 2016-05-15 19:03:58 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"2584937", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "79702186-2e66-4b9f-a304-8898ba1e01a4"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "07abe4f0-f223-485a-9a79-c1670965a002"], ["id", 2]]
+ [1m[35m (106.8ms)[0m commit transaction
+Completed 200 OK in 324ms (Views: 0.7ms | ActiveRecord: 108.3ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:04:22 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (3.0ms)
+Completed 200 OK in 301ms (Views: 226.5ms | ActiveRecord: 2.3ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 19:04:23 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 19:04:23 +0300
+Started GET "/oauth/yandex?code=3888474" for 127.0.0.1 at 2016-05-15 19:04:24 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"3888474", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.2ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.6ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "5de5c7b6-f6b9-4386-b5e5-6cf7abfc297a"], ["id", 2]]
+ [1m[36m (107.5ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 437ms (Views: 0.5ms | ActiveRecord: 109.0ms)
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 19:04:24 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "5de5c7b6-f6b9-4386-b5e5-6cf7abfc297a"]]
+ [1m[35mSQL (0.5ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 0.9ms)
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+-------------------------------------
+OauthServiceProviderTest: test_logout
+-------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:04:24 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "5de5c7b6-f6b9-4386-b5e5-6cf7abfc297a"]]
+ [1m[35mSQL (0.7ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ Rendered login/index.html.erb within layouts/application (0.6ms)
+Completed 200 OK in 12ms (Views: 3.5ms | ActiveRecord: 0.9ms)
+Started GET "/oauth/yandex?code=7373077" for 127.0.0.1 at 2016-05-15 19:04:25 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"7373077", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "5de5c7b6-f6b9-4386-b5e5-6cf7abfc297a"]]
+ [1m[35mSQL (0.5ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "9b1b4d4a-fa0b-48a3-bfd8-f9447bef2d02"], ["id", 2]]
+ [1m[35m (102.2ms)[0m commit transaction
+Completed 200 OK in 319ms (Views: 0.4ms | ActiveRecord: 103.8ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_truth
+------------------------------------
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:05:13 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (3.0ms)
+Completed 200 OK in 305ms (Views: 228.8ms | ActiveRecord: 2.3ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 19:05:13 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 19:05:13 +0300
+Started GET "/oauth/yandex?code=6712384" for 127.0.0.1 at 2016-05-15 19:05:14 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"6712384", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.9ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "6da1c743-ee33-4bb6-9e90-c8b98c32b9d4"], ["id", 2]]
+ [1m[36m (100.3ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 323ms (Views: 0.5ms | ActiveRecord: 102.4ms)
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 19:05:15 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "6da1c743-ee33-4bb6-9e90-c8b98c32b9d4"]]
+ [1m[35mSQL (0.5ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 7ms (Views: 0.3ms | ActiveRecord: 0.8ms)
+-------------------------------------
+OauthServiceProviderTest: test_logout
+-------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:05:15 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.6ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (0.4ms)
+Completed 200 OK in 9ms (Views: 2.3ms | ActiveRecord: 1.2ms)
+Started GET "/oauth/yandex?code=3729323" for 127.0.0.1 at 2016-05-15 19:05:16 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"3729323", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.7ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "ca4bcdf4-1be3-4354-b4ca-52e0d1d8a178"], ["id", 2]]
+ [1m[35m (116.0ms)[0m commit transaction
+Completed 200 OK in 301ms (Views: 0.6ms | ActiveRecord: 118.0ms)
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+Started GET "/login/logout" for 127.0.0.1 at 2016-05-15 19:05:16 +0300
+Processing by LoginController#logout as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "ca4bcdf4-1be3-4354-b4ca-52e0d1d8a178"]]
+ [1m[36mSQL (0.6ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2[0m
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "ca4bcdf4-1be3-4354-b4ca-52e0d1d8a178"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", nil], ["id", 2]]
+ [1m[36m (120.8ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 131ms (Views: 0.4ms | ActiveRecord: 122.1ms)
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 19:05:16 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "ca4bcdf4-1be3-4354-b4ca-52e0d1d8a178"]]
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.6ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+Filter chain halted as :check_access rendered or redirected
+Completed 403 Forbidden in 7ms (Views: 0.2ms | ActiveRecord: 0.9ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:07:17 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.4ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (3.0ms)
+Completed 200 OK in 307ms (Views: 222.5ms | ActiveRecord: 2.4ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 19:07:17 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 19:07:17 +0300
+Started GET "/oauth/yandex?code=6088918" for 127.0.0.1 at 2016-05-15 19:07:19 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"6088918", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.9ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.7ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "838c495c-890a-4fbb-887d-a3cefac1cc12"], ["id", 2]]
+ [1m[36m (85.8ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 278ms (Views: 0.6ms | ActiveRecord: 87.9ms)
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 19:07:19 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "838c495c-890a-4fbb-887d-a3cefac1cc12"]]
+ [1m[35mSQL (0.7ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 10ms (Views: 0.3ms | ActiveRecord: 1.2ms)
+-------------------------------------
+OauthServiceProviderTest: test_logout
+-------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:07:19 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.5ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (0.4ms)
+Completed 200 OK in 10ms (Views: 2.8ms | ActiveRecord: 1.2ms)
+Started GET "/oauth/yandex?code=8875563" for 127.0.0.1 at 2016-05-15 19:07:21 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"8875563", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "a82e26f4-3da2-4f84-b1d8-67510d378175"], ["id", 2]]
+ [1m[35m (86.8ms)[0m commit transaction
+Completed 200 OK in 303ms (Views: 0.6ms | ActiveRecord: 88.9ms)
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+Started GET "/login/logout" for 127.0.0.1 at 2016-05-15 19:07:21 +0300
+Processing by LoginController#logout as HTML
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "a82e26f4-3da2-4f84-b1d8-67510d378175"]]
+ [1m[36mSQL (0.9ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2[0m
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "a82e26f4-3da2-4f84-b1d8-67510d378175"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", nil], ["id", 2]]
+ [1m[36m (188.3ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 202ms (Views: 0.4ms | ActiveRecord: 190.1ms)
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 19:07:21 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "a82e26f4-3da2-4f84-b1d8-67510d378175"]]
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.8ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+Filter chain halted as :check_access rendered or redirected
+Completed 403 Forbidden in 10ms (Views: 0.3ms | ActiveRecord: 1.2ms)
+ [1m[36m (128.7ms)[0m [1mCREATE TABLE "urls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "url_pattern" varchar, "name" varchar, "http_method" varchar) [0m
+ [1m[35m (98.3ms)[0m CREATE TABLE "user_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar)
+ [1m[36m (0.1ms)[0m [1mselect sqlite_version(*)[0m
+ [1m[35m (131.2ms)[0m CREATE INDEX "index_user_groups_on_name" ON "user_groups" ("name")
+ [1m[36m (106.6ms)[0m [1mCREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "api_code" varchar) [0m
+ [1m[35m (90.3ms)[0m CREATE INDEX "index_users_on_name" ON "users" ("name")
+ [1m[36m (114.9ms)[0m [1mCREATE TABLE "users_groups" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_group_id" integer, "user_id" integer) [0m
+ [1m[35m (123.6ms)[0m CREATE TABLE "users_urls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_group_id" integer, "url_id" integer)
+ [1m[36m (122.4ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
+ [1m[35m (123.4ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
+ [1m[36m (0.3ms)[0m [1mSELECT version FROM "schema_migrations"[0m
+ [1m[35m (123.4ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160514163909')
+ [1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "guest"]]
+ [1m[35m (121.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"]]
+ [1m[36m (85.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?)[0m [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"]]
+ [1m[35m (96.1ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login/logout"], ["name", "Logout page"], ["http_method", "GET"]]
+ [1m[36m (96.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Guest"]]
+ [1m[35m (111.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 1], ["user_group_id", 1]]
+ [1m[36m (108.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id", "user_group_id") VALUES (?, ?)[0m [["url_id", 1], ["user_group_id", 1]]
+ [1m[35m (104.8ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_urls" ("url_id", "user_group_id") VALUES (?, ?) [["url_id", 2], ["user_group_id", 1]]
+ [1m[36m (113.0ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id", "user_group_id") VALUES (?, ?)[0m [["url_id", 3], ["user_group_id", 1]]
+ [1m[35m (113.0ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("name") VALUES (?) [["name", "bar555@yandex.ru"]]
+ [1m[36m (105.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Test"]]
+ [1m[35m (95.8ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 2], ["user_group_id", 2]]
+ [1m[36m (104.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 2], ["user_group_id", 1]]
+ [1m[35m (104.5ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (103.6ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id", "user_group_id") VALUES (?, ?)[0m [["url_id", 4], ["user_group_id", 2]]
+ [1m[35m (112.3ms)[0m commit transaction
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:12:24 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.2ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (2.4ms)
+Completed 200 OK in 226ms (Views: 199.9ms | ActiveRecord: 0.7ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 19:12:24 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 19:12:24 +0300
+Started GET "/oauth/yandex?code=6165377" for 127.0.0.1 at 2016-05-15 19:12:26 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"6165377", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.8ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "c62f2193-02cc-4e2f-8174-c7bbf7086f89"], ["id", 2]]
+ [1m[35m (110.7ms)[0m commit transaction
+Completed 200 OK in 311ms (Views: 0.6ms | ActiveRecord: 112.8ms)
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 19:12:26 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "c62f2193-02cc-4e2f-8174-c7bbf7086f89"]]
+ [1m[36mSQL (0.8ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2[0m
+Completed 200 OK in 10ms (Views: 0.4ms | ActiveRecord: 1.2ms)
+-------------------------------------
+OauthServiceProviderTest: test_logout
+-------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:12:27 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.8ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (0.5ms)
+Completed 200 OK in 13ms (Views: 3.9ms | ActiveRecord: 1.1ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+-------------------------------------
+OauthServiceProviderTest: test_logout
+-------------------------------------
+ [1m[35m (0.0ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "guest"]]
+ [1m[35m (110.6ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"]]
+ [1m[36m (101.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?)[0m [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"]]
+ [1m[35m (96.4ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login/logout"], ["name", "Logout page"], ["http_method", "GET"]]
+ [1m[36m (79.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Guest"]]
+ [1m[35m (103.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 3], ["user_group_id", 3]]
+ [1m[36m (108.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id", "user_group_id") VALUES (?, ?)[0m [["url_id", 5], ["user_group_id", 3]]
+ [1m[35m (111.1ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_urls" ("url_id", "user_group_id") VALUES (?, ?) [["url_id", 6], ["user_group_id", 3]]
+ [1m[36m (106.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id", "user_group_id") VALUES (?, ?)[0m [["url_id", 7], ["user_group_id", 3]]
+ [1m[35m (96.0ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("name") VALUES (?) [["name", "bar555@yandex.ru"]]
+ [1m[36m (103.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Test"]]
+ [1m[35m (121.1ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 4], ["user_group_id", 4]]
+ [1m[36m (104.2ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 4], ["user_group_id", 3]]
+ [1m[35m (104.4ms)[0m commit transaction
+ [1m[36m (0.3ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (87.2ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id", "user_group_id") VALUES (?, ?)[0m [["url_id", 8], ["user_group_id", 4]]
+ [1m[35m (120.7ms)[0m commit transaction
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:13:10 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.4ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.7ms)
+Completed 200 OK in 274ms (Views: 231.0ms | ActiveRecord: 1.3ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 19:13:11 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 19:13:11 +0300
+Started GET "/oauth/yandex?code=5603163" for 127.0.0.1 at 2016-05-15 19:13:12 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"5603163", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.4ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.6ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "c2298fe3-35cf-4204-ba05-9439d3a627fe"], ["id", 2]]
+ [1m[35m (103.3ms)[0m commit transaction
+Completed 200 OK in 324ms (Views: 0.5ms | ActiveRecord: 104.8ms)
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+Started GET "/login/logout" for 127.0.0.1 at 2016-05-15 19:13:12 +0300
+Processing by LoginController#logout as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "c2298fe3-35cf-4204-ba05-9439d3a627fe"]]
+ [1m[36mSQL (0.5ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2[0m
+ [1m[35mCACHE (0.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "c2298fe3-35cf-4204-ba05-9439d3a627fe"]]
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", nil], ["id", 2]]
+ [1m[36m (121.7ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 132ms (Views: 0.4ms | ActiveRecord: 122.9ms)
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 19:13:13 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "c2298fe3-35cf-4204-ba05-9439d3a627fe"]]
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.6ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+Filter chain halted as :check_access rendered or redirected
+Completed 403 Forbidden in 7ms (Views: 0.3ms | ActiveRecord: 1.0ms)
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:13:13 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.6ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (0.4ms)
+Completed 200 OK in 9ms (Views: 2.6ms | ActiveRecord: 0.8ms)
+Started GET "/oauth/yandex?code=4768587" for 127.0.0.1 at 2016-05-15 19:13:14 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"4768587", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.9ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "2b34a786-cfcb-41ec-9ee7-94575c4c54a1"], ["id", 2]]
+ [1m[36m (108.4ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 302ms (Views: 0.5ms | ActiveRecord: 110.5ms)
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 19:13:14 +0300
+Processing by TestController#index as HTML
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "2b34a786-cfcb-41ec-9ee7-94575c4c54a1"]]
+ [1m[35mSQL (0.9ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 1.4ms)
+ [1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
+------------------------------------
+OauthServiceProviderTest: test_login
+------------------------------------
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "users" ("name") VALUES (?)[0m [["name", "guest"]]
+ [1m[35m (131.2ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login"], ["name", "Login page"], ["http_method", "GET"]]
+ [1m[36m (100.4ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?)[0m [["url_pattern", "^/oauth/.*"], ["name", "AuthCallback page"], ["http_method", "GET"]]
+ [1m[35m (104.3ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/login/logout"], ["name", "Logout page"], ["http_method", "GET"]]
+ [1m[36m (103.9ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Guest"]]
+ [1m[35m (96.4ms)[0m commit transaction
+ [1m[36m (0.1ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 5], ["user_group_id", 5]]
+ [1m[36m (110.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id", "user_group_id") VALUES (?, ?)[0m [["url_id", 9], ["user_group_id", 5]]
+ [1m[35m (110.5ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_urls" ("url_id", "user_group_id") VALUES (?, ?) [["url_id", 10], ["user_group_id", 5]]
+ [1m[36m (87.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users_urls" ("url_id", "user_group_id") VALUES (?, ?)[0m [["url_id", 11], ["user_group_id", 5]]
+ [1m[35m (121.3ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("name") VALUES (?) [["name", "bar555@yandex.ru"]]
+ [1m[36m (120.8ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "user_groups" ("name") VALUES (?)[0m [["name", "Test"]]
+ [1m[35m (129.1ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?) [["user_id", 6], ["user_group_id", 6]]
+ [1m[36m (120.7ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_groups" ("user_id", "user_group_id") VALUES (?, ?)[0m [["user_id", 6], ["user_group_id", 5]]
+ [1m[35m (104.8ms)[0m commit transaction
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "urls" ("url_pattern", "name", "http_method") VALUES (?, ?, ?) [["url_pattern", "^/test"], ["name", "Test page"], ["http_method", "GET"]]
+ [1m[36m (105.1ms)[0m [1mcommit transaction[0m
+ [1m[35m (0.2ms)[0m begin transaction
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users_urls" ("url_id", "user_group_id") VALUES (?, ?)[0m [["url_id", 12], ["user_group_id", 6]]
+ [1m[35m (104.7ms)[0m commit transaction
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:13:32 +0300
+Processing by LoginController#index as HTML
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.4ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ Rendered login/index.html.erb within layouts/application (3.8ms)
+Completed 200 OK in 284ms (Views: 239.7ms | ActiveRecord: 1.3ms)
+Started GET "/assets/application-e80e8f2318043e8af94dddc2adad5a4f09739a8ebb323b3ab31cd71d45fd9113.css" for 127.0.0.1 at 2016-05-15 19:13:33 +0300
+Started GET "/assets/application-8f06a73c35179188914ab50e057157639fce1401c1cdca640ac9cec33746fc5b.js" for 127.0.0.1 at 2016-05-15 19:13:33 +0300
+Started GET "/oauth/yandex?code=2038643" for 127.0.0.1 at 2016-05-15 19:13:34 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"2038643", "provider_name"=>"yandex"}
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.9ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+ [1m[35m (0.3ms)[0m begin transaction
+ [1m[36mSQL (0.5ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", "0f71a625-98f1-4d64-ba6a-4e6693cf8d4d"], ["id", 2]]
+ [1m[35m (118.3ms)[0m commit transaction
+Completed 200 OK in 450ms (Views: 0.5ms | ActiveRecord: 120.5ms)
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 19:13:34 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "0f71a625-98f1-4d64-ba6a-4e6693cf8d4d"]]
+ [1m[36mSQL (0.9ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2[0m
+Completed 200 OK in 11ms (Views: 0.3ms | ActiveRecord: 1.3ms)
+-------------------------------------
+OauthServiceProviderTest: test_logout
+-------------------------------------
+Started GET "/login" for 127.0.0.1 at 2016-05-15 19:13:35 +0300
+Processing by LoginController#index as HTML
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.7ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ Rendered login/index.html.erb within layouts/application (0.5ms)
+Completed 200 OK in 12ms (Views: 3.5ms | ActiveRecord: 1.0ms)
+Started GET "/oauth/yandex?code=7338106" for 127.0.0.1 at 2016-05-15 19:13:36 +0300
+Processing by LoginController#oauth_callback as HTML
+ Parameters: {"code"=>"7338106", "provider_name"=>"yandex"}
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "guest"]]
+ [1m[36mSQL (0.6ms)[0m [1mSELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+ [1m[36m (0.2ms)[0m [1mbegin transaction[0m
+ [1m[35mSQL (0.5ms)[0m UPDATE "users" SET "api_code" = ? WHERE "users"."id" = ? [["api_code", "bdbf5d84-e05c-432e-8ccc-d51f2d3df8c5"], ["id", 2]]
+ [1m[36m (175.5ms)[0m [1mcommit transaction[0m
+Completed 200 OK in 647ms (Views: 0.5ms | ActiveRecord: 177.3ms)
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1 [["name", "bar555@yandex.ru"]]
+Started GET "/login/logout" for 127.0.0.1 at 2016-05-15 19:13:37 +0300
+Processing by LoginController#logout as HTML
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "bdbf5d84-e05c-432e-8ccc-d51f2d3df8c5"]]
+ [1m[35mSQL (1.0ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 2
+ [1m[36mCACHE (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1[0m [["api_code", "bdbf5d84-e05c-432e-8ccc-d51f2d3df8c5"]]
+ [1m[35m (0.1ms)[0m begin transaction
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "users" SET "api_code" = ? WHERE "users"."id" = ?[0m [["api_code", nil], ["id", 2]]
+ [1m[35m (168.6ms)[0m commit transaction
+Completed 200 OK in 184ms (Views: 0.4ms | ActiveRecord: 170.6ms)
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "bar555@yandex.ru"]]
+Started GET "/test" for 127.0.0.1 at 2016-05-15 19:13:37 +0300
+Processing by TestController#index as HTML
+ [1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."api_code" = ? LIMIT 1 [["api_code", "bdbf5d84-e05c-432e-8ccc-d51f2d3df8c5"]]
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT 1[0m [["name", "guest"]]
+ [1m[35mSQL (0.9ms)[0m SELECT "urls"."id" AS t0_r0, "urls"."url_pattern" AS t0_r1, "urls"."name" AS t0_r2, "urls"."http_method" AS t0_r3, "users_urls"."id" AS t1_r0, "users_urls"."user_group_id" AS t1_r1, "users_urls"."url_id" AS t1_r2, "user_groups"."id" AS t2_r0, "user_groups"."name" AS t2_r1, "users_groups"."id" AS t3_r0, "users_groups"."user_group_id" AS t3_r1, "users_groups"."user_id" AS t3_r2, "users"."id" AS t4_r0, "users"."name" AS t4_r1, "users"."api_code" AS t4_r2 FROM "urls" LEFT OUTER JOIN "users_urls" ON "users_urls"."url_id" = "urls"."id" LEFT OUTER JOIN "user_groups" ON "user_groups"."id" = "users_urls"."user_group_id" LEFT OUTER JOIN "users_groups" ON "users_groups"."user_group_id" = "user_groups"."id" LEFT OUTER JOIN "users" ON "users"."id" = "users_groups"."user_id" WHERE "users_groups"."user_id" = 1
+Filter chain halted as :check_access rendered or redirected
+Completed 403 Forbidden in 10ms (Views: 0.3ms | ActiveRecord: 1.3ms)