spec/dummy/log/test.log in bookingsync-engine-2.0.2 vs spec/dummy/log/test.log in bookingsync-engine-3.0.0
- old
+ new
@@ -10072,5 +10072,2852 @@
[1m[35m (0.0ms)[0m ROLLBACK
[1m[36m (0.0ms)[0m [1mBEGIN[0m
[1m[35m (0.1ms)[0m ROLLBACK
[1m[36m (0.0ms)[0m [1mBEGIN[0m
[1m[35m (0.0ms)[0m ROLLBACK
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+Completed 500 Internal Server Error in 92ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+Redirected to http://test.host/auth/bookingsync/?account_id=
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 20ms (Views: 15.1ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.3ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.643626"], ["updated_at", "2017-06-21 02:19:36.643626"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", "2017-06-21 02:19:36.645811"], ["synced_id", 0], ["id", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.661896"], ["updated_at", "2017-06-21 02:19:36.661896"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925176"]]
+ [1m[35m (0.7ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (1.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (1.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:19:36.687108"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184376"], ["id", 2]]
+ [1m[35m (0.6ms)[0m [1m[35mCOMMIT[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 2]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (1.0ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.696527"], ["updated_at", "2017-06-21 02:19:36.696527"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925176"]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 3], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:19:36.703522"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184376"], ["id", 3]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 3], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.4ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 3]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.713228"], ["updated_at", "2017-06-21 02:19:36.713228"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498097976"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.721320"], ["updated_at", "2017-06-21 02:19:36.721320"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.724365"], ["updated_at", "2017-06-21 02:19:36.724365"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 6], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:19:36.728056"], ["id", 6]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.733089"], ["updated_at", "2017-06-21 02:19:36.733089"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.735187"], ["updated_at", "2017-06-21 02:19:36.735187"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 8], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:19:36.738542"], ["id", 8]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 8], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.742836"], ["updated_at", "2017-06-21 02:19:36.742836"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.744833"], ["updated_at", "2017-06-21 02:19:36.744833"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 10], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:19:36.747646"], ["id", 10]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 10], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.752218"], ["updated_at", "2017-06-21 02:19:36.752218"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.758660"], ["updated_at", "2017-06-21 02:19:36.758660"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.762787"], ["updated_at", "2017-06-21 02:19:36.762787"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.766658"], ["updated_at", "2017-06-21 02:19:36.766658"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.770223"], ["updated_at", "2017-06-21 02:19:36.770223"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.773505"], ["updated_at", "2017-06-21 02:19:36.773505"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.776872"], ["updated_at", "2017-06-21 02:19:36.776872"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.780411"], ["updated_at", "2017-06-21 02:19:36.780411"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2017-06-21 02:19:36.826505"], ["updated_at", "2017-06-21 02:19:36.826505"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 19], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:19:36.828250"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 19]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 19], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+Completed 500 Internal Server Error in 84ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+Redirected to http://test.host/auth/bookingsync/?account_id=
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.6ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:07.987617"], ["updated_at", "2017-06-21 02:20:07.987617"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:07.991205"], ["updated_at", "2017-06-21 02:20:07.991205"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:20:07.996172"], ["id", 2]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.001666"], ["updated_at", "2017-06-21 02:20:08.001666"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.003376"], ["updated_at", "2017-06-21 02:20:08.003376"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 4], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:20:08.005526"], ["id", 4]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 4], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.008883"], ["updated_at", "2017-06-21 02:20:08.008883"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.010531"], ["updated_at", "2017-06-21 02:20:08.010531"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 6], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:20:08.012851"], ["id", 6]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 6], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.016168"], ["updated_at", "2017-06-21 02:20:08.016168"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.022469"], ["updated_at", "2017-06-21 02:20:08.022469"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.026536"], ["updated_at", "2017-06-21 02:20:08.026536"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.028893"], ["updated_at", "2017-06-21 02:20:08.028893"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.031963"], ["updated_at", "2017-06-21 02:20:08.031963"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.035752"], ["updated_at", "2017-06-21 02:20:08.035752"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.038410"], ["updated_at", "2017-06-21 02:20:08.038410"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.040573"], ["updated_at", "2017-06-21 02:20:08.040573"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.043378"], ["updated_at", "2017-06-21 02:20:08.043378"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 15], ["LIMIT", 1]]
+ [1m[35mSQL (0.9ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:20:08.045009"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 15]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.6ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 15], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.055253"], ["updated_at", "2017-06-21 02:20:08.055253"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", "2017-06-21 02:20:08.056896"], ["synced_id", 0], ["id", 16]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.067165"], ["updated_at", "2017-06-21 02:20:08.067165"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498098008"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.070477"], ["updated_at", "2017-06-21 02:20:08.070477"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925208"]]
+ [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 18], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:20:08.089827"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184408"], ["id", 18]]
+ [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 18], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 18]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.097619"], ["updated_at", "2017-06-21 02:20:08.097619"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925208"]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 19], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:20:08.101740"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184408"], ["id", 19]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 19]]
+ [1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:08.122228"], ["updated_at", "2017-06-21 02:20:08.122228"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 4ms (ActiveRecord: 1.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 12ms (Views: 7.8ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+Completed 500 Internal Server Error in 82ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+Redirected to http://test.host/auth/bookingsync/?account_id=
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 13ms (Views: 7.7ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.868263"], ["updated_at", "2017-06-21 02:20:19.868263"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 27ms (ActiveRecord: 7.7ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.874300"], ["updated_at", "2017-06-21 02:20:19.874300"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/admin
+Completed 302 Found in 4ms (ActiveRecord: 1.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.879831"], ["updated_at", "2017-06-21 02:20:19.879831"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 3ms (ActiveRecord: 0.9ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.920066"], ["updated_at", "2017-06-21 02:20:19.920066"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925219"]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 4], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:20:19.935190"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184419"], ["id", 4]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 4], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 4]]
+ [1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.942817"], ["updated_at", "2017-06-21 02:20:19.942817"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925219"]]
+ [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 5], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:20:19.946162"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184419"], ["id", 5]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 5]]
+ [1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.951076"], ["updated_at", "2017-06-21 02:20:19.951076"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498098019"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.953761"], ["updated_at", "2017-06-21 02:20:19.953761"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.959987"], ["updated_at", "2017-06-21 02:20:19.959987"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.963742"], ["updated_at", "2017-06-21 02:20:19.963742"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.966656"], ["updated_at", "2017-06-21 02:20:19.966656"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.970140"], ["updated_at", "2017-06-21 02:20:19.970140"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.972942"], ["updated_at", "2017-06-21 02:20:19.972942"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.977403"], ["updated_at", "2017-06-21 02:20:19.977403"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.980414"], ["updated_at", "2017-06-21 02:20:19.980414"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.983784"], ["updated_at", "2017-06-21 02:20:19.983784"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.985761"], ["updated_at", "2017-06-21 02:20:19.985761"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 16], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:20:19.988682"], ["id", 16]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.992397"], ["updated_at", "2017-06-21 02:20:19.992397"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:19.994359"], ["updated_at", "2017-06-21 02:20:19.994359"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 18], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:20:19.997001"], ["id", 18]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 18], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:20.001261"], ["updated_at", "2017-06-21 02:20:20.001261"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:20.003740"], ["updated_at", "2017-06-21 02:20:20.003740"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 20], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:20:20.006730"], ["id", 20]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 20], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:20.011868"], ["updated_at", "2017-06-21 02:20:20.011868"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 21], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:20:20.014037"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 21]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 21], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2017-06-21 02:20:20.022629"], ["updated_at", "2017-06-21 02:20:20.022629"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", "2017-06-21 02:20:20.024564"], ["synced_id", 0], ["id", 22]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 15ms (Views: 10.3ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.480247"], ["updated_at", "2017-06-21 02:23:17.480247"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/admin
+Completed 302 Found in 31ms (ActiveRecord: 8.1ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.485976"], ["updated_at", "2017-06-21 02:23:17.485976"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 3ms (ActiveRecord: 0.8ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.493393"], ["updated_at", "2017-06-21 02:23:17.493393"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 5ms (ActiveRecord: 1.3ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.504762"], ["updated_at", "2017-06-21 02:23:17.504762"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925397"]]
+ [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (1.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 4], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:23:17.523270"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184597"], ["id", 4]]
+ [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 4], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 4]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.534598"], ["updated_at", "2017-06-21 02:23:17.534598"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925397"]]
+ [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 5], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:23:17.538920"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184597"], ["id", 5]]
+ [1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.7ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 5]]
+ [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.546895"], ["updated_at", "2017-06-21 02:23:17.546895"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498098197"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.597283"], ["updated_at", "2017-06-21 02:23:17.597283"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", "2017-06-21 02:23:17.598737"], ["synced_id", 0], ["id", 7]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (0.4ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.609767"], ["updated_at", "2017-06-21 02:23:17.609767"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 8], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:23:17.612116"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 8]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 8], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.616356"], ["updated_at", "2017-06-21 02:23:17.616356"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.3ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (0.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.625181"], ["updated_at", "2017-06-21 02:23:17.625181"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.628790"], ["updated_at", "2017-06-21 02:23:17.628790"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.631432"], ["updated_at", "2017-06-21 02:23:17.631432"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.634151"], ["updated_at", "2017-06-21 02:23:17.634151"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.636293"], ["updated_at", "2017-06-21 02:23:17.636293"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.638760"], ["updated_at", "2017-06-21 02:23:17.638760"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.641427"], ["updated_at", "2017-06-21 02:23:17.641427"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.644994"], ["updated_at", "2017-06-21 02:23:17.644994"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.646646"], ["updated_at", "2017-06-21 02:23:17.646646"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 18], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:23:17.648990"], ["id", 18]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.651870"], ["updated_at", "2017-06-21 02:23:17.651870"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.653549"], ["updated_at", "2017-06-21 02:23:17.653549"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 20], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:23:17.656079"], ["id", 20]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 20], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.659770"], ["updated_at", "2017-06-21 02:23:17.659770"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:23:17.661461"], ["updated_at", "2017-06-21 02:23:17.661461"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 22], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:23:17.663542"], ["id", 22]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 22], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+Completed 500 Internal Server Error in 73ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+Redirected to http://test.host/auth/bookingsync/?account_id=
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as JS
+Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as JS
+Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+Completed 500 Internal Server Error in 94ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+Completed 500 Internal Server Error in 88ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+Completed 500 Internal Server Error in 93ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+Completed 500 Internal Server Error in 93ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+Completed 500 Internal Server Error in 97ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+ Rendering text template
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 5ms (Views: 4.9ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as JS
+Completed 500 Internal Server Error in 87ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as JS
+Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+Redirected to http://test.host/auth/bookingsync/?account_id=
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+ Rendering text template
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.6ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.136115"], ["updated_at", "2017-06-21 02:27:23.136115"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 34ms (ActiveRecord: 9.8ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.142909"], ["updated_at", "2017-06-21 02:27:23.142909"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/admin
+Completed 302 Found in 4ms (ActiveRecord: 1.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.151387"], ["updated_at", "2017-06-21 02:27:23.151387"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 4ms (ActiveRecord: 1.3ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 12ms (Views: 7.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.215194"], ["updated_at", "2017-06-21 02:27:23.215194"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.220939"], ["updated_at", "2017-06-21 02:27:23.220939"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.224850"], ["updated_at", "2017-06-21 02:27:23.224850"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.228385"], ["updated_at", "2017-06-21 02:27:23.228385"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.232602"], ["updated_at", "2017-06-21 02:27:23.232602"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.235476"], ["updated_at", "2017-06-21 02:27:23.235476"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.238420"], ["updated_at", "2017-06-21 02:27:23.238420"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.242101"], ["updated_at", "2017-06-21 02:27:23.242101"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.247086"], ["updated_at", "2017-06-21 02:27:23.247086"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.249768"], ["updated_at", "2017-06-21 02:27:23.249768"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 13], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:27:23.254162"], ["id", 13]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.259224"], ["updated_at", "2017-06-21 02:27:23.259224"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.261347"], ["updated_at", "2017-06-21 02:27:23.261347"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 15], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:27:23.265178"], ["id", 15]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 15], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.270501"], ["updated_at", "2017-06-21 02:27:23.270501"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.273461"], ["updated_at", "2017-06-21 02:27:23.273461"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 17], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:27:23.277738"], ["id", 17]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.5ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 17], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.284523"], ["updated_at", "2017-06-21 02:27:23.284523"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 18], ["LIMIT", 1]]
+ [1m[35mSQL (0.8ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:27:23.287230"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 18]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 18], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.293523"], ["updated_at", "2017-06-21 02:27:23.293523"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925643"]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (1.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 19], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:27:23.312796"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184843"], ["id", 19]]
+ [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 19], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 19]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.321254"], ["updated_at", "2017-06-21 02:27:23.321254"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925643"]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 20], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:27:23.325176"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184843"], ["id", 20]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.5ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.6ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 20]]
+ [1m[35m (0.6ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.334141"], ["updated_at", "2017-06-21 02:27:23.334141"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498098443"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:23.341877"], ["updated_at", "2017-06-21 02:27:23.341877"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", "2017-06-21 02:27:23.343585"], ["synced_id", 0], ["id", 22]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+Redirected to http://test.host/auth/bookingsync/?account_id=
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+ Rendering text template
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 3ms (Views: 2.8ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (1.0ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (1.0ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.802913"], ["updated_at", "2017-06-21 02:27:30.802913"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/admin
+Completed 302 Found in 44ms (ActiveRecord: 12.6ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.813367"], ["updated_at", "2017-06-21 02:27:30.813367"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 6ms (ActiveRecord: 1.5ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.821852"], ["updated_at", "2017-06-21 02:27:30.821852"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 5ms (ActiveRecord: 1.3ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.2ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 13ms (Views: 7.8ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.871541"], ["updated_at", "2017-06-21 02:27:30.871541"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", "2017-06-21 02:27:30.873898"], ["synced_id", 0], ["id", 4]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.884216"], ["updated_at", "2017-06-21 02:27:30.884216"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.889831"], ["updated_at", "2017-06-21 02:27:30.889831"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.895920"], ["updated_at", "2017-06-21 02:27:30.895920"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.900309"], ["updated_at", "2017-06-21 02:27:30.900309"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.904510"], ["updated_at", "2017-06-21 02:27:30.904510"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.907593"], ["updated_at", "2017-06-21 02:27:30.907593"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.911178"], ["updated_at", "2017-06-21 02:27:30.911178"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.915170"], ["updated_at", "2017-06-21 02:27:30.915170"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.919617"], ["updated_at", "2017-06-21 02:27:30.919617"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.921835"], ["updated_at", "2017-06-21 02:27:30.921835"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 14], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:27:30.926543"], ["id", 14]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.930548"], ["updated_at", "2017-06-21 02:27:30.930548"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.932686"], ["updated_at", "2017-06-21 02:27:30.932686"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 16], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:27:30.935256"], ["id", 16]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 16], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.939083"], ["updated_at", "2017-06-21 02:27:30.939083"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.941232"], ["updated_at", "2017-06-21 02:27:30.941232"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 18], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:27:30.944333"], ["id", 18]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 18], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.950436"], ["updated_at", "2017-06-21 02:27:30.950436"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498098450"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.954547"], ["updated_at", "2017-06-21 02:27:30.954547"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925650"]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 20], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:27:30.971996"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184850"], ["id", 20]]
+ [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 20]]
+ [1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:30.978118"], ["updated_at", "2017-06-21 02:27:30.978118"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925650"]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 21], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:27:30.982773"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498184850"], ["id", 21]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 21], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 21]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2017-06-21 02:27:31.024658"], ["updated_at", "2017-06-21 02:27:31.024658"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 22], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:27:31.027159"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 22]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 22], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498098649"], ["created_at", "2017-06-21 02:30:49.616800"], ["updated_at", "2017-06-21 02:30:49.616800"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925849"], ["created_at", "2017-06-21 02:30:49.620388"], ["updated_at", "2017-06-21 02:30:49.620388"]]
+ [1m[35m (0.3ms)[0m COMMIT
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mAccount Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 2) LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185049"], ["updated_at", "2017-06-21 02:30:49.636497"], ["id", 2]]
+ [1m[36m (0.4ms)[0m [1mCOMMIT[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 2]]
+ [1m[35mAccount Load (0.4ms)[0m SELECT "accounts".* FROM "accounts"
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = $1 [["id", 2]]
+ [1m[36m (0.3ms)[0m [1mCOMMIT[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925849"], ["created_at", "2017-06-21 02:30:49.652613"], ["updated_at", "2017-06-21 02:30:49.652613"]]
+ [1m[36m (0.5ms)[0m [1mCOMMIT[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 3) LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185049"], ["updated_at", "2017-06-21 02:30:49.656423"], ["id", 3]]
+ [1m[36m (0.4ms)[0m [1mCOMMIT[0m
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts"
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = $1 [["id", 3]]
+ [1m[36m (0.3ms)[0m [1mCOMMIT[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mAccount Load (0.5ms)[0m [1mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2017-06-21 02:30:49.665148"], ["updated_at", "2017-06-21 02:30:49.665148"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "synced_id" = $1, "updated_at" = $2 WHERE "accounts"."id" = $3 [["synced_id", 0], ["updated_at", "2017-06-21 02:30:49.666807"], ["id", 4]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.4ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:30:49.677833"], ["updated_at", "2017-06-21 02:30:49.677833"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:30:49.680142"], ["updated_at", "2017-06-21 02:30:49.680142"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 6) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:30:49.683451"], ["id", 6]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:30:49.688104"], ["updated_at", "2017-06-21 02:30:49.688104"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:30:49.690535"], ["updated_at", "2017-06-21 02:30:49.690535"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 8) LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:30:49.694351"], ["id", 8]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 8]]
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:30:49.698832"], ["updated_at", "2017-06-21 02:30:49.698832"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:30:49.700773"], ["updated_at", "2017-06-21 02:30:49.700773"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 10) LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:30:49.703871"], ["id", 10]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 10]]
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:30:49.707776"], ["updated_at", "2017-06-21 02:30:49.707776"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:30:49.714113"], ["updated_at", "2017-06-21 02:30:49.714113"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:30:49.717888"], ["updated_at", "2017-06-21 02:30:49.717888"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:30:49.720711"], ["updated_at", "2017-06-21 02:30:49.720711"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:30:49.724310"], ["updated_at", "2017-06-21 02:30:49.724310"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:30:49.726817"], ["updated_at", "2017-06-21 02:30:49.726817"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:30:49.730113"], ["updated_at", "2017-06-21 02:30:49.730113"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:30:49.732838"], ["updated_at", "2017-06-21 02:30:49.732838"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2017-06-21 02:30:49.735719"], ["updated_at", "2017-06-21 02:30:49.735719"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 19) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2017-06-21 02:30:49.737730"], ["id", 19]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 19]]
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+Processing by SessionsController#create as HTML
+ Parameters: {"params"=>{"provider"=>"bookingsync"}}
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:30:49.762670"], ["updated_at", "2017-06-21 02:30:49.762670"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/admin
+Completed 302 Found in 4ms (ActiveRecord: 0.9ms)
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"params"=>{"provider"=>"bookingsync"}}
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:30:49.771075"], ["updated_at", "2017-06-21 02:30:49.771075"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/
+Completed 302 Found in 4ms (ActiveRecord: 1.0ms)
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+Processing by SessionsController#create as HTML
+ Parameters: {"params"=>{"provider"=>"bookingsync"}}
+ [1m[36mAccount Load (0.4ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:30:49.780302"], ["updated_at", "2017-06-21 02:30:49.780302"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 4ms (ActiveRecord: 1.1ms)
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
+Completed 200 OK in 19ms (Views: 18.5ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.0ms)
+Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 4ms (Views: 3.7ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+Redirected to http://test.host/auth/bookingsync/?account_id=
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+ Parameters: {"xhr"=>true}
+ Rendered text template (0.0ms)
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+ Parameters: {"xhr"=>true}
+Redirected to http://test.host/auth/bookingsync/?account_id=
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 15ms (Views: 15.1ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"params"=>{"provider"=>"bookingsync"}}
+ [1m[35mAccount Load (0.4ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:02.315518"], ["updated_at", "2017-06-21 02:32:02.315518"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/admin
+Completed 302 Found in 31ms (ActiveRecord: 5.6ms)
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+Processing by SessionsController#create as HTML
+ Parameters: {"params"=>{"provider"=>"bookingsync"}}
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:02.323393"], ["updated_at", "2017-06-21 02:32:02.323393"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 3ms (ActiveRecord: 0.7ms)
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"params"=>{"provider"=>"bookingsync"}}
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:02.329835"], ["updated_at", "2017-06-21 02:32:02.329835"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/
+Completed 302 Found in 3ms (ActiveRecord: 0.7ms)
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+Processing by AuthenticatedController#index as HTML
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 4ms (Views: 4.0ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+Processing by AuthenticatedController#index as HTML
+Redirected to http://test.host/auth/bookingsync/?account_id=
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+Processing by AuthenticatedController#index as HTML
+ Parameters: {"xhr"=>true}
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+Processing by AuthenticatedController#index as HTML
+ Parameters: {"xhr"=>true}
+Redirected to http://test.host/auth/bookingsync/?account_id=
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498098722"], ["created_at", "2017-06-21 02:32:02.376181"], ["updated_at", "2017-06-21 02:32:02.376181"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925922"], ["created_at", "2017-06-21 02:32:02.379449"], ["updated_at", "2017-06-21 02:32:02.379449"]]
+ [1m[36m (0.4ms)[0m [1mCOMMIT[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mAccount Exists (0.5ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 5) LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5[0m [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185122"], ["updated_at", "2017-06-21 02:32:02.398678"], ["id", 5]]
+ [1m[35m (0.5ms)[0m COMMIT
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 5]]
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mSQL (0.2ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 5]]
+ [1m[35m (0.3ms)[0m COMMIT
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925922"], ["created_at", "2017-06-21 02:32:02.407189"], ["updated_at", "2017-06-21 02:32:02.407189"]]
+ [1m[35m (0.4ms)[0m COMMIT
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 6) LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5[0m [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185122"], ["updated_at", "2017-06-21 02:32:02.410322"], ["id", 6]]
+ [1m[35m (0.3ms)[0m COMMIT
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mSQL (0.1ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 6]]
+ [1m[35m (0.3ms)[0m COMMIT
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:02.414628"], ["updated_at", "2017-06-21 02:32:02.414628"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:02.419700"], ["updated_at", "2017-06-21 02:32:02.419700"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:02.422450"], ["updated_at", "2017-06-21 02:32:02.422450"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:02.425301"], ["updated_at", "2017-06-21 02:32:02.425301"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.0ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:02.428000"], ["updated_at", "2017-06-21 02:32:02.428000"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:02.430483"], ["updated_at", "2017-06-21 02:32:02.430483"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:02.432921"], ["updated_at", "2017-06-21 02:32:02.432921"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:02.435233"], ["updated_at", "2017-06-21 02:32:02.435233"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:02.438632"], ["updated_at", "2017-06-21 02:32:02.438632"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:32:02.440733"], ["updated_at", "2017-06-21 02:32:02.440733"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 16) LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:32:02.443208"], ["id", 16]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:02.446185"], ["updated_at", "2017-06-21 02:32:02.446185"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:32:02.447845"], ["updated_at", "2017-06-21 02:32:02.447845"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 18) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:32:02.449960"], ["id", 18]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.1ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 18]]
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.0ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:02.452997"], ["updated_at", "2017-06-21 02:32:02.452997"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:32:02.455244"], ["updated_at", "2017-06-21 02:32:02.455244"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.1ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 20) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:32:02.457814"], ["id", 20]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 20]]
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mAccount Load (0.6ms)[0m [1mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2017-06-21 02:32:02.495645"], ["updated_at", "2017-06-21 02:32:02.495645"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "synced_id" = $1, "updated_at" = $2 WHERE "accounts"."id" = $3 [["synced_id", 0], ["updated_at", "2017-06-21 02:32:02.497408"], ["id", 21]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2017-06-21 02:32:02.506937"], ["updated_at", "2017-06-21 02:32:02.506937"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 22) LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2017-06-21 02:32:02.508681"], ["id", 22]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 22]]
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+Redirected to http://test.host/auth/bookingsync/?account_id=
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 8ms (Views: 8.0ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+ Parameters: {"xhr"=>true}
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+ Parameters: {"xhr"=>true}
+Redirected to http://test.host/auth/bookingsync/?account_id=
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"params"=>{"provider"=>"bookingsync"}}
+ [1m[35mAccount Load (0.5ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.4ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:31.604312"], ["updated_at", "2017-06-21 02:32:31.604312"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/admin
+Completed 302 Found in 30ms (ActiveRecord: 6.5ms)
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+Processing by SessionsController#create as HTML
+ Parameters: {"params"=>{"provider"=>"bookingsync"}}
+ [1m[36mAccount Load (0.4ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:31.614440"], ["updated_at", "2017-06-21 02:32:31.614440"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 4ms (ActiveRecord: 1.0ms)
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"params"=>{"provider"=>"bookingsync"}}
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:31.622290"], ["updated_at", "2017-06-21 02:32:31.622290"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/
+Completed 302 Found in 4ms (ActiveRecord: 0.9ms)
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+Processing by SessionsController#failure as HTML
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 11ms (Views: 11.0ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+Processing by SessionsController#failure as HTML
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.1ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2017-06-21 02:32:31.648883"], ["updated_at", "2017-06-21 02:32:31.648883"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.4ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 4) LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5[0m [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2017-06-21 02:32:31.651805"], ["id", 4]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 4]]
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925951"], ["created_at", "2017-06-21 02:32:31.657509"], ["updated_at", "2017-06-21 02:32:31.657509"]]
+ [1m[35m (0.4ms)[0m COMMIT
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mAccount Exists (0.9ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 5) LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5[0m [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185151"], ["updated_at", "2017-06-21 02:32:31.678151"], ["id", 5]]
+ [1m[35m (0.4ms)[0m COMMIT
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mSQL (0.2ms)[0m [1mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 5]]
+ [1m[35m (0.3ms)[0m COMMIT
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497925951"], ["created_at", "2017-06-21 02:32:31.684044"], ["updated_at", "2017-06-21 02:32:31.684044"]]
+ [1m[35m (0.3ms)[0m COMMIT
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 6) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185151"], ["updated_at", "2017-06-21 02:32:31.687768"], ["id", 6]]
+ [1m[36m (0.4ms)[0m [1mCOMMIT[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 6]]
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts"
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = $1 [["id", 6]]
+ [1m[36m (0.3ms)[0m [1mCOMMIT[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498098751"], ["created_at", "2017-06-21 02:32:31.694188"], ["updated_at", "2017-06-21 02:32:31.694188"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:31.697801"], ["updated_at", "2017-06-21 02:32:31.697801"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:32:31.700063"], ["updated_at", "2017-06-21 02:32:31.700063"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 9) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:32:31.703209"], ["id", 9]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:31.706837"], ["updated_at", "2017-06-21 02:32:31.706837"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:32:31.709355"], ["updated_at", "2017-06-21 02:32:31.709355"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.4ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 11) LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:32:31.713826"], ["id", 11]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 11]]
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:31.717843"], ["updated_at", "2017-06-21 02:32:31.717843"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:32:31.720268"], ["updated_at", "2017-06-21 02:32:31.720268"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 13) LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:32:31.723256"], ["id", 13]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 13]]
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:31.726953"], ["updated_at", "2017-06-21 02:32:31.726953"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:31.732142"], ["updated_at", "2017-06-21 02:32:31.732142"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:31.735846"], ["updated_at", "2017-06-21 02:32:31.735846"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:31.738447"], ["updated_at", "2017-06-21 02:32:31.738447"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:31.741728"], ["updated_at", "2017-06-21 02:32:31.741728"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:31.744954"], ["updated_at", "2017-06-21 02:32:31.744954"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:32:31.748128"], ["updated_at", "2017-06-21 02:32:31.748128"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:32:31.751765"], ["updated_at", "2017-06-21 02:32:31.751765"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mAccount Load (0.5ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2017-06-21 02:32:31.758277"], ["updated_at", "2017-06-21 02:32:31.758277"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "synced_id" = $1, "updated_at" = $2 WHERE "accounts"."id" = $3[0m [["synced_id", 0], ["updated_at", "2017-06-21 02:32:31.760276"], ["id", 22]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mAccount Load (1.0ms)[0m SELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT 1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2017-06-21 02:34:39.899116"], ["updated_at", "2017-06-21 02:34:39.899116"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "synced_id" = $1, "updated_at" = $2 WHERE "accounts"."id" = $3[0m [["synced_id", 0], ["updated_at", "2017-06-21 02:34:39.901588"], ["id", 1]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 0 LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498098879"], ["created_at", "2017-06-21 02:34:39.921940"], ["updated_at", "2017-06-21 02:34:39.921940"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497926079"], ["created_at", "2017-06-21 02:34:39.926188"], ["updated_at", "2017-06-21 02:34:39.926188"]]
+ [1m[35m (0.4ms)[0m COMMIT
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mAccount Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 3) LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185279"], ["updated_at", "2017-06-21 02:34:39.954583"], ["id", 3]]
+ [1m[36m (0.4ms)[0m [1mCOMMIT[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 3]]
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts"
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = $1 [["id", 3]]
+ [1m[36m (0.4ms)[0m [1mCOMMIT[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497926079"], ["created_at", "2017-06-21 02:34:39.963116"], ["updated_at", "2017-06-21 02:34:39.963116"]]
+ [1m[36m (0.4ms)[0m [1mCOMMIT[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36mAccount Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 4) LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185279"], ["updated_at", "2017-06-21 02:34:39.968313"], ["id", 4]]
+ [1m[36m (0.4ms)[0m [1mCOMMIT[0m
+ [1m[35mAccount Load (0.4ms)[0m SELECT "accounts".* FROM "accounts"
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mSQL (0.2ms)[0m DELETE FROM "accounts" WHERE "accounts"."id" = $1 [["id", 4]]
+ [1m[36m (0.4ms)[0m [1mCOMMIT[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:34:39.974974"], ["updated_at", "2017-06-21 02:34:39.974974"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:34:39.977061"], ["updated_at", "2017-06-21 02:34:39.977061"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 6) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6 [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:34:39.980437"], ["id", 6]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:34:39.985361"], ["updated_at", "2017-06-21 02:34:39.985361"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:34:39.987432"], ["updated_at", "2017-06-21 02:34:39.987432"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.3ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 8) LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:34:39.990486"], ["id", 8]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 8]]
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:34:39.994515"], ["updated_at", "2017-06-21 02:34:39.994515"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 123], ["created_at", "2017-06-21 02:34:39.996396"], ["updated_at", "2017-06-21 02:34:39.996396"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" = 123 AND "accounts"."id" != 10) LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:34:39.999016"], ["id", 10]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1[0m [["id", 10]]
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:34:40.002814"], ["updated_at", "2017-06-21 02:34:40.002814"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36mAccount Load (0.6ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:34:40.010048"], ["updated_at", "2017-06-21 02:34:40.010048"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "accounts"
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:34:40.014147"], ["updated_at", "2017-06-21 02:34:40.014147"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.3ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:34:40.017362"], ["updated_at", "2017-06-21 02:34:40.017362"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.3ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:34:40.022005"], ["updated_at", "2017-06-21 02:34:40.022005"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:34:40.024819"], ["updated_at", "2017-06-21 02:34:40.024819"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.2ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 456 LIMIT 1
+ [1m[36mSQL (0.2ms)[0m [1mINSERT INTO "accounts" ("provider", "synced_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["provider", "bookingsync"], ["synced_id", 456], ["created_at", "2017-06-21 02:34:40.027775"], ["updated_at", "2017-06-21 02:34:40.027775"]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mAccount Load (0.2ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:34:40.030346"], ["updated_at", "2017-06-21 02:34:40.030346"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"], ["created_at", "2017-06-21 02:34:40.033407"], ["updated_at", "2017-06-21 02:34:40.033407"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE ("accounts"."synced_id" IS NULL AND "accounts"."id" != 19) LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m UPDATE "accounts" SET "oauth_access_token" = $1, "oauth_refresh_token" = $2, "oauth_expires_at" = $3, "updated_at" = $4 WHERE "accounts"."id" = $5 [["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["updated_at", "2017-06-21 02:34:40.035380"], ["id", 19]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mAccount Load (0.2ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 19]]
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+Processing by SessionsController#failure as HTML
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 17ms (Views: 17.3ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+Processing by SessionsController#failure as HTML
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+Processing by SessionsController#create as HTML
+ Parameters: {"params"=>{"provider"=>"bookingsync"}}
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:34:40.127962"], ["updated_at", "2017-06-21 02:34:40.127962"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/admin
+Completed 302 Found in 4ms (ActiveRecord: 0.9ms)
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"params"=>{"provider"=>"bookingsync"}}
+ [1m[35mAccount Load (0.5ms)[0m SELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1 [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mAccount Exists (0.3ms)[0m SELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1
+ [1m[36mSQL (0.3ms)[0m [1mINSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:34:40.137202"], ["updated_at", "2017-06-21 02:34:40.137202"]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/
+Completed 302 Found in 5ms (ActiveRecord: 1.5ms)
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+Processing by SessionsController#create as HTML
+ Parameters: {"params"=>{"provider"=>"bookingsync"}}
+ [1m[36mAccount Load (0.3ms)[0m [1mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT 1[0m [["synced_id", 123], ["provider", "bookingsync"]]
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mAccount Exists (0.2ms)[0m [1mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = 123 LIMIT 1[0m
+ [1m[35mSQL (0.2ms)[0m INSERT INTO "accounts" ("synced_id", "provider", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["synced_id", 123], ["provider", "bookingsync"], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["created_at", "2017-06-21 02:34:40.147022"], ["updated_at", "2017-06-21 02:34:40.147022"]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 4ms (ActiveRecord: 0.9ms)
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+ Parameters: {"xhr"=>true}
+Redirected to http://test.host/auth/bookingsync/?account_id=
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+ Parameters: {"xhr"=>true}
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 5ms (Views: 4.7ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+Redirected to http://test.host/auth/bookingsync/?account_id=
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+Redirected to http://test.host/auth/bookingsync/?account_id=
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 302 Found in 4ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+ Rendering text template
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 9ms (Views: 8.5ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.6ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.8ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/admin
+Completed 302 Found in 48ms (ActiveRecord: 11.3ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 6ms (ActiveRecord: 1.5ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 5ms (ActiveRecord: 1.2ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.3ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 11ms (Views: 7.2ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.0ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.0ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.0ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", 2017-06-21 02:35:17 UTC], ["synced_id", 0], ["id", 4]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 6], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2017-06-21 02:35:17 UTC], ["id", 6]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 8], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2017-06-21 02:35:17 UTC], ["id", 8]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 8], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 10], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", 2017-06-21 02:35:17 UTC], ["id", 10]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 10], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497926117"]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.8ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 19], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2017-06-21 02:35:17 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185317"], ["id", 19]]
+ [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 19]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497926117"]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 20], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2017-06-21 02:35:17 UTC], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185317"], ["id", 20]]
+ [1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 20], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 20]]
+ [1m[35m (0.3ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498098917"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", 2017-06-21 02:35:17 UTC], ["updated_at", 2017-06-21 02:35:17 UTC], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 22], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", 2017-06-21 02:35:17 UTC], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 22]]
+ [1m[35m (0.2ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 22], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.3ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.7ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.6ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.565889"], ["updated_at", "2017-06-21 02:35:23.565889"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.569798"], ["updated_at", "2017-06-21 02:35:23.569798"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 2], ["LIMIT", 1]]
+ [1m[35mSQL (0.7ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:35:23.575532"], ["id", 2]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.582331"], ["updated_at", "2017-06-21 02:35:23.582331"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.584294"], ["updated_at", "2017-06-21 02:35:23.584294"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 4], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:35:23.586904"], ["id", 4]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 4], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.591283"], ["updated_at", "2017-06-21 02:35:23.591283"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.593429"], ["updated_at", "2017-06-21 02:35:23.593429"], ["provider", "bookingsync"], ["synced_id", 123]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.7ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 6], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "name" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4, "updated_at" = $5 WHERE "accounts"."id" = $6[0m [["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"], ["updated_at", "2017-06-21 02:35:23.597553"], ["id", 6]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 6], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.602159"], ["updated_at", "2017-06-21 02:35:23.602159"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.607541"], ["updated_at", "2017-06-21 02:35:23.607541"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[34mSELECT COUNT(*) FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.611813"], ["updated_at", "2017-06-21 02:35:23.611813"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.614707"], ["updated_at", "2017-06-21 02:35:23.614707"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.618114"], ["updated_at", "2017-06-21 02:35:23.618114"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.620725"], ["updated_at", "2017-06-21 02:35:23.620725"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 456], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id") VALUES ($1, $2, $3, $4) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.623614"], ["updated_at", "2017-06-21 02:35:23.623614"], ["provider", "bookingsync"], ["synced_id", 456]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.1ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.626332"], ["updated_at", "2017-06-21 02:35:23.626332"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" ORDER BY "accounts"."id" ASC LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.634546"], ["updated_at", "2017-06-21 02:35:23.634546"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "synced_id" = $2 WHERE "accounts"."id" = $3[0m [["updated_at", "2017-06-21 02:35:23.636255"], ["synced_id", 0], ["id", 15]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.5ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 0], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL LIMIT $1[0m [["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.687716"], ["updated_at", "2017-06-21 02:35:23.687716"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh"], ["oauth_expires_at", "expires"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" IS NULL AND ("accounts"."id" != $1) LIMIT $2[0m [["id", 16], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:35:23.689927"], ["oauth_access_token", nil], ["oauth_refresh_token", nil], ["oauth_expires_at", nil], ["id", 16]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 16], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.4ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.694187"], ["updated_at", "2017-06-21 02:35:23.694187"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1498098923"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.698527"], ["updated_at", "2017-06-21 02:35:23.698527"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497926123"]]
+ [1m[35m (2.0ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (1.0ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 18], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:35:23.717151"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185323"], ["id", 18]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[36mAccount Load (0.4ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.3ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 18]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "synced_id", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.723697"], ["updated_at", "2017-06-21 02:35:23.723697"], ["synced_id", 123], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh_token"], ["oauth_expires_at", "1497926123"]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[36mAccount Exists (0.4ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 AND ("accounts"."id" != $2) LIMIT $3[0m [["synced_id", 123], ["id", 19], ["LIMIT", 1]]
+ [1m[35mSQL (0.5ms)[0m [1m[33mUPDATE "accounts" SET "updated_at" = $1, "oauth_access_token" = $2, "oauth_refresh_token" = $3, "oauth_expires_at" = $4 WHERE "accounts"."id" = $5[0m [["updated_at", "2017-06-21 02:35:23.728672"], ["oauth_access_token", "refreshed_token"], ["oauth_refresh_token", "refreshed_refresh_token"], ["oauth_expires_at", "1498185323"], ["id", 19]]
+ [1m[35m (0.5ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT $2[0m [["id", 19], ["LIMIT", 1]]
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts"[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35mSQL (0.2ms)[0m [1m[31mDELETE FROM "accounts" WHERE "accounts"."id" = $1[0m [["id", 19]]
+ [1m[35m (0.4ms)[0m [1m[35mCOMMIT[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/signed_out
+Completed 302 Found in 1ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#destroy as HTML
+Redirected to http://test.host/
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.750295"], ["updated_at", "2017-06-21 02:35:23.750295"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 3ms (ActiveRecord: 0.9ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.3ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.2ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.756343"], ["updated_at", "2017-06-21 02:35:23.756343"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/admin
+Completed 302 Found in 4ms (ActiveRecord: 1.1ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#create as HTML
+ Parameters: {"provider"=>"bookingsync"}
+ [1m[36mAccount Load (0.2ms)[0m [1m[34mSELECT "accounts".* FROM "accounts" WHERE "accounts"."synced_id" = $1 AND "accounts"."provider" = $2 LIMIT $3[0m [["synced_id", 123], ["provider", "bookingsync"], ["LIMIT", 1]]
+ [1m[35m (0.2ms)[0m [1m[35mSAVEPOINT active_record_1[0m
+ [1m[36mAccount Exists (0.3ms)[0m [1m[34mSELECT 1 AS one FROM "accounts" WHERE "accounts"."synced_id" = $1 LIMIT $2[0m [["synced_id", 123], ["LIMIT", 1]]
+ [1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "accounts" ("created_at", "updated_at", "provider", "synced_id", "name", "oauth_access_token", "oauth_refresh_token", "oauth_expires_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"[0m [["created_at", "2017-06-21 02:35:23.763723"], ["updated_at", "2017-06-21 02:35:23.763723"], ["provider", "bookingsync"], ["synced_id", 123], ["name", "business name"], ["oauth_access_token", "token"], ["oauth_refresh_token", "refresh token"], ["oauth_expires_at", "expires at"]]
+ [1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/
+Completed 302 Found in 5ms (ActiveRecord: 1.1ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.2ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 15ms (Views: 11.1ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by SessionsController#failure as HTML
+ Rendering /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application
+ Rendered /Users/seb/work/websites/bookingsync/gems/bookingsync-engine/app/views/sessions/failure.html.erb within layouts/application (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+Redirected to http://test.host/auth/bookingsync/?account_id=
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 302 Found in 0ms (ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as HTML
+ Rendering text template
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.2ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m
+ [1m[35m (0.1ms)[0m [1m[35mBEGIN[0m
+Processing by AuthenticatedController#index as JS
+ Rendering text template
+ Rendered text template (0.0ms)
+ Template rendering was prevented by rspec-rails. Use `render_views` to verify rendered view contents if necessary.
+Filter chain halted as :authenticate_account! rendered or redirected
+Completed 401 Unauthorized in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
+ [1m[35m (0.1ms)[0m [1m[31mROLLBACK[0m